MarkedInputProps
Defined in: react/markput/src/components/MarkedInput.tsx:33
Props for MarkedInput component.
Example
Section titled “Example”<MarkedInput<ChipProps> Mark={Chip} options={[{ markup: '@[__value__]', mark: { label: 'Click me' } }]}/>Type Parameters
Section titled “Type Parameters”| Type Parameter | Default type | Description |
|---|---|---|
TMarkProps | MarkProps | Type of props for the global Mark component |
TOverlayProps | OverlayProps | Type of props for the global Overlay component |
Properties
Section titled “Properties”className?
Section titled “className?”optional className: string;Defined in: react/markput/src/components/MarkedInput.tsx:47
Additional classes
defaultValue?
Section titled “defaultValue?”optional defaultValue: string;Defined in: react/markput/src/components/MarkedInput.tsx:68
Initial value for uncontrolled mode
optional drag: | boolean | { alwaysShowHandle: boolean;};Defined in: react/markput/src/components/MarkedInput.tsx:77
Enable drag mode: each individual token (mark or text) becomes its own draggable row.
One mark per row, one text fragment per row.
Adjacent marks need no separator; adjacent text rows are separated by \n\n.
optional Mark: ComponentType<TMarkProps>;Defined in: react/markput/src/components/MarkedInput.tsx:37
Global component used for rendering markups (fallback for option.mark.slot)
onChange()?
Section titled “onChange()?”optional onChange: (value) => void;Defined in: react/markput/src/components/MarkedInput.tsx:70
Change event handler
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
value | string |
Returns
Section titled “Returns”void
options?
Section titled “options?”optional options: Option<TMarkProps, TOverlayProps>[];Defined in: react/markput/src/components/MarkedInput.tsx:45
Configuration options for markups and overlays. Each option can specify its own slot component via mark.slot or overlay.slot. Falls back to global Mark/Overlay components when not specified.
Overlay?
Section titled “Overlay?”optional Overlay: ComponentType<TOverlayProps>;Defined in: react/markput/src/components/MarkedInput.tsx:39
Global component used for rendering overlays (fallback for option.overlay.slot)
readOnly?
Section titled “readOnly?”optional readOnly: boolean;Defined in: react/markput/src/components/MarkedInput.tsx:72
Read-only mode
optional ref: Ref<MarkputHandler>;Defined in: react/markput/src/components/MarkedInput.tsx:35
Ref to handler
showOverlayOn?
Section titled “showOverlayOn?”optional showOverlayOn: OverlayTrigger;Defined in: react/markput/src/components/MarkedInput.tsx:64
Events that trigger overlay display
Default
Section titled “Default”'change'slotProps?
Section titled “slotProps?”optional slotProps: SlotProps;Defined in: react/markput/src/components/MarkedInput.tsx:59
Props to pass to slot components
Example
Section titled “Example”slotProps={{ container: { onKeyDown: handler }, span: { className: 'custom' } }}slots?
Section titled “slots?”optional slots: Slots;Defined in: react/markput/src/components/MarkedInput.tsx:54
Override internal components using slots
Example
Section titled “Example”slots={{ container: 'div', span: 'span' }}style?
Section titled “style?”optional style: CSSProperties;Defined in: react/markput/src/components/MarkedInput.tsx:49
Additional style
value?
Section titled “value?”optional value: string;Defined in: react/markput/src/components/MarkedInput.tsx:66
Annotated text with markups