MarkedInputProps
Defined in: packages/markput/src/components/MarkedInput.tsx:28
Props for MarkedInput component.
Example
Section titled “Example”<MarkedInput<ChipProps> Mark={Chip} options={[{ markup: '@[__value__]', mark: { label: 'Click me' } }]}/>Extends
Section titled “Extends”CoreMarkputProps
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: packages/markput/src/components/MarkedInput.tsx:42
Additional classes
defaultValue?
Section titled “defaultValue?”optional defaultValue: string;Defined in: packages/core/src/shared/types.ts:46
Default value
Inherited from
Section titled “Inherited from”CoreMarkputProps.defaultValueoptional Mark: ComponentType<TMarkProps>;Defined in: packages/markput/src/components/MarkedInput.tsx:32
Global component used for rendering markups (fallback for option.mark.slot)
onChange()?
Section titled “onChange()?”optional onChange: (value) => void;Defined in: packages/core/src/shared/types.ts:48
Change event handler
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
value | string |
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”CoreMarkputProps.onChangeoptions?
Section titled “options?”optional options: Option<TMarkProps, TOverlayProps>[];Defined in: packages/markput/src/components/MarkedInput.tsx:40
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.
Overrides
Section titled “Overrides”CoreMarkputProps.optionsOverlay?
Section titled “Overlay?”optional Overlay: ComponentType<TOverlayProps>;Defined in: packages/markput/src/components/MarkedInput.tsx:34
Global component used for rendering overlays (fallback for option.overlay.slot)
readOnly?
Section titled “readOnly?”optional readOnly: boolean;Defined in: packages/core/src/shared/types.ts:50
Prevents from changing the value
Inherited from
Section titled “Inherited from”CoreMarkputProps.readOnlyoptional ref: ForwardedRef<MarkedInputHandler>;Defined in: packages/markput/src/components/MarkedInput.tsx:30
Ref to handler
showOverlayOn?
Section titled “showOverlayOn?”optional showOverlayOn: OverlayTrigger;Defined in: packages/markput/src/components/MarkedInput.tsx:61
Events that trigger overlay display
Default
Section titled “Default”'change'Overrides
Section titled “Overrides”CoreMarkputProps.showOverlayOnslotProps?
Section titled “slotProps?”optional slotProps: SlotProps;Defined in: packages/markput/src/components/MarkedInput.tsx:56
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: packages/markput/src/components/MarkedInput.tsx:50
Override internal components using slots
Example
Section titled “Example”slots={{ container: 'div', span: 'span' }}style?
Section titled “style?”optional style: CSSProperties;Defined in: packages/markput/src/components/MarkedInput.tsx:44
Additional style
value?
Section titled “value?”optional value: string;Defined in: packages/core/src/shared/types.ts:44
Annotated text with markups for mark
Inherited from
Section titled “Inherited from”CoreMarkputProps.value