Skip to content
Rich Content

EditorImage

client49.25 kB
/editorEditorImageProps

Preview

Props

11
PropTypeDefault

alt

string""

className

string

disabled

booleanfalse

editor

PinturaEditorComponent

fallback

ReactNode

labels

Partial<EditorImageLabels>

onOpenChange

((opened: boolean) => void)

onProcess

((result: PinturaEditorResult) => void)

opened

boolean

ratio

number4 / 3

src

required
string

Slot props

5

Each one spreads over an inner element, so you can restyle a region without forking the component.

PropTypeDefault

editorProps

Record<string, unknown>

hintProps

The floating label over the image. Only rendered when there is an editor.

BoxSlotProps

imageProps

The button image. Its `src` and `alt` come from the component props.

Omit<DetailedHTMLProps<ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, "ref">

missingProps

The missing-peer notice. Only rendered without `editor` and without `fallback`.

TextSlotProps

triggerProps

The button that opens the editor. Its aspect-ratio variable is written after the slot. It is also the route to the shape of the frame —`triggerProps={{ r: "lg" }}`—, which used to be the `radius` prop: the style props of the component itself land on the wrapper, not on the button.

EditorImageTriggerProps

Also accepts

On top of its own props, this component forwards these groups.

Style props · 128