Skip to content

TkxImageEditor

import { TkxImageEditor } from 'tekivex-ui';

ImageEditor is part of the tekivex-ui library. Every component is self-tested against WCAG 2.1 AAA criteria, fully typed, and tree-shakeable. A third-party AAA audit is on the roadmap, not completed.

PropTypeRequiredDescription
srcstringInitial image source (URL, data URL, or omit for empty drop zone).
aspectRatioAspectRatioInitial aspect ratio. Defaults to “free”.
ratiosAspectRatio[]Allowed aspect ratios in the toolbar.
mimeType'image/png' | 'image/jpeg' | 'image/webp'Output MIME type. Defaults to “image/png”. JPEG strips alpha.
qualitynumberJPEG / WebP quality (0..1). Defaults to 0.92.
maxOutputSizenumberMaximum output dimension in px. Image is downscaled to fit. Defaults to 2048.
outputFilenamestringFilename used for the File output.
onChange(state: { rotation: number; brightness: number; contrast: number }) => voidCalled every time the user changes crop / rotation / filters.
onResult(result: ImageEditResult) => voidCalled when the user clicks “Apply” / explicitly via getResult().
onCancel() => voidCalled when the user clicks “Cancel”.
classNamestringOptional className on the root container.
styleCSSPropertiesOptional inline style on the root container.
labelsPartial<{Localised labels for buttons / status text.
dropstringyes
browsestringyes
rotatestringyes
applystringyes
cancelstringyes
brightnessstringyes
contraststringyes
aspectstringyes
freestringyes
  • Keyboard navigation supported on all interactive elements
  • :focus-visible outline at 2px (theme-token primary)
  • ARIA roles and properties applied per WAI-ARIA 1.2
  • Respects prefers-reduced-motion
  • Minimum 44×44 touch target where applicable

The implementation lives at src/components/TkxImageEditor.tsx.

This page is a generated scaffold. It will be replaced with hand-authored examples and a live preview in a follow-up release. For interactive demos, see the legacy demo site.