Skip to content

@gtkx/react / TextAnchorProps

Type Alias: TextAnchorProps

TextAnchorProps = object

Defined in: packages/react/src/jsx.ts:166

Props for the TextAnchor virtual element.

Used to declaratively embed widgets within text content in a TextBuffer. The anchor is placed at the current position in the text flow.

Example

tsx
<GtkTextView>
    <x.TextBuffer>
        Click here: <x.TextAnchor>
            <GtkButton label="Click me" />
        </x.TextAnchor> to continue.
    </x.TextBuffer>
</GtkTextView>

Properties

children?

optional children?: ReactNode

Defined in: packages/react/src/jsx.ts:170

The widget to embed at this anchor position


replacementChar?

optional replacementChar?: string

Defined in: packages/react/src/jsx.ts:168

Replacement character displayed when the widget is not visible (e.g. in serialized text)