Skip to content

SpanProps

Defined in: react/markput/src/types.ts:33

Props passed to the global Span — the component that paints a TEXT token.

IT IS HANDED A ref AND A MARK IS NOT, which is the whole of why this is its own type. A mark is painted inside a wrapper markput owns and that wrapper carries the consignment, so a Mark component forwards nothing; a text token’s element IS the Surface core writes into, so the ref lands on the consumer’s own element. A Span that drops it leaves the text unbound and the caret cannot resolve into it.

optional children: ReactNode;

Defined in: react/markput/src/types.ts:21

Rendered children content (ReactNode) for nested marks

MarkProps.children


optional meta: string;

Defined in: react/markput/src/types.ts:19

Additional metadata for the mark

MarkProps.meta


optional ref: RefCallback<HTMLElement>;

Defined in: react/markput/src/types.ts:35

Spread onto the element the component renders — see RowProps.ref for the same rule.


optional value: string;

Defined in: react/markput/src/types.ts:17

Main content value of the mark

MarkProps.value