Skip to content

Interface: SemanticProps

@termwright/ink


@termwright/ink / SemanticProps

Defined in: ink/src/semantic.tsx:29

Semantic props: the annotation, plus the element it describes.

readonly optional actions?: readonly ("focus" | "activate" | "toggle" | "setValue" | "scroll" | "select" | "expand")[]

Defined in: ink/src/types.ts:15

Descriptive input intent. Actions still travel through the terminal.

InkSemanticAnnotation.actions


readonly children: SemanticChild

Defined in: ink/src/semantic.tsx:37

Exactly one element that accepts a ref — in practice an Ink <Box>.

<Text> does not take a ref, so wrapping one annotates nothing. Wrap the text in a <Box> instead, which is what giving it a shape would require anyway.


readonly optional describedBy?: readonly RefObject<DOMElement | null>[]

Defined in: ink/src/types.ts:17

InkSemanticAnnotation.describedBy


readonly optional description?: string

Defined in: ink/src/types.ts:10

InkSemanticAnnotation.description


readonly optional extended?: SemanticExtendedObject

Defined in: ink/src/types.ts:13

Application-domain JSON; never merged into portable framework state.

InkSemanticAnnotation.extended


readonly optional labelledBy?: readonly RefObject<DOMElement | null>[]

Defined in: ink/src/types.ts:16

InkSemanticAnnotation.labelledBy


readonly optional name?: string

Defined in: ink/src/types.ts:9

Accessible name used by getByRole(role, { name }).

InkSemanticAnnotation.name


readonly optional role?: "application" | "region" | "dialog" | "alert" | "status" | "list" | "listitem" | "menu" | "menuitem" | "button" | "checkbox" | "radio" | "tab" | "textbox" | "heading" | "text" | "progressbar" | "separator" | "scrollbar" | "table" | "row" | "cell" | "generic"

Defined in: ink/src/types.ts:7

InkSemanticAnnotation.role


readonly optional testId?: string

Defined in: ink/src/types.ts:11

InkSemanticAnnotation.testId