Option
Defined in: react/markput/src/types.ts:42
React-specific markup option for defining mark behavior and styling.
Example
Section titled “Example”const option: Option<ChipProps> = { markup: '@[__value__]', mark: { slot: Chip, label: 'Click' }}Extends
Section titled “Extends”CoreOption
Type Parameters
Section titled “Type Parameters”| Type Parameter | Default type | Description |
|---|---|---|
TMarkProps | MarkProps | Type of props for the mark component |
TOverlayProps extends CoreOption["overlay"] | OverlayProps | Type of props for the overlay component |
Properties
Section titled “Properties”optional mark: TMarkProps | (props) => TMarkProps;Defined in: react/markput/src/types.ts:52
Props for the mark component. Can be a static object or a function that transforms MarkProps.
optional Mark: ComponentType<TMarkProps>;Defined in: react/markput/src/types.ts:47
Per-option component for rendering this mark
markup?
Section titled “markup?”optional markup: Markup;Defined in: core/src/shared/types.ts:57
Template string in which the mark is rendered.
Must contain placeholders: __value__, __meta__, and/or __slot__
Placeholder types:
__value__- main content (plain text, no nesting)__meta__- additional metadata (plain text, no nesting)__slot__- content supporting nested structures
Examples
Section titled “Examples”// Simple value"@[__value__]"// Value with metadata"@[__value__](__meta__)"// Nested content support"@[__slot__]"Inherited from
Section titled “Inherited from”CoreOption.markupoverlay?
Section titled “overlay?”optional overlay: TOverlayProps;Defined in: react/markput/src/types.ts:58
Props for the overlay component.
Overrides
Section titled “Overrides”CoreOption.overlayOverlay?
Section titled “Overlay?”optional Overlay: ComponentType<TOverlayProps>;Defined in: react/markput/src/types.ts:54
Per-option component for rendering this overlay