Skip to content

TabContainerProps

Defined in: react/components/layout/tabcontainer.tsx:4

Props shared by every ztui React component (plus each component’s own props).

optional activeIndex?: number

Defined in: react/components/layout/tabcontainer.tsx:6

Index of the active tab.


optional children?: ReactNode

Defined in: react/components/types.ts:38

Child elements.

ComponentProps.children


optional className?: string

Defined in: react/components/types.ts:24

Space-separated class names (currently advisory; no CSS cascade).

ComponentProps.className


optional disabled?: boolean

Defined in: react/components/types.ts:59

Marks the widget (and its descendants) as inert: not focusable, ignores key/mouse input, and interactive controls render in a muted style. A disabled container propagates to every control inside it.

ComponentProps.disabled


optional focusable?: boolean

Defined in: react/components/types.ts:40

Allow this widget to take keyboard focus.

ComponentProps.focusable


optional focusOnClick?: boolean

Defined in: react/components/types.ts:53

When a click lands on this container (its padding, border, or a non-focusable child), move focus to its first focusable descendant — so clicking a Form/Panel/Box hands focus to its first field. Off by default.

ComponentProps.focusOnClick


optional hoverInterest?: boolean

Defined in: react/components/types.ts:73

Opt-in hint that this widget cares about passive hover movement.

ComponentProps.hoverInterest


optional id?: string

Defined in: react/components/types.ts:22

Stable identifier, handy for tests and lookups.

ComponentProps.id


optional label?: string

Defined in: react/components/types.ts:36

Structural/accessible label (also the tab title inside TabContainer).

ComponentProps.label


optional onChange?: (index) => void

Defined in: react/components/layout/tabcontainer.tsx:8

Called with the new index when the tab changes.

number

void


optional onClick?: (ev) => void

Defined in: react/components/types.ts:61

Pointer click.

any

void

ComponentProps.onClick


optional onDragEnd?: (x, y, moved) => void

Defined in: react/components/types.ts:79

Drag released; moved is false for a tap with no movement.

number

number

boolean

void

ComponentProps.onDragEnd


optional onDragMove?: (x, y) => void

Defined in: react/components/types.ts:77

Pointer moved while dragging from this widget.

number

number

void

ComponentProps.onDragMove


optional onDragStart?: (x, y) => void

Defined in: react/components/types.ts:75

Pointer-drag lifecycle; moved is false for a tap with no movement.

number

number

void

ComponentProps.onDragStart


optional onKey?: (ev) => void

Defined in: react/components/types.ts:65

Key event while focused; set ev.handled to consume it.

any

void

ComponentProps.onKey


optional onMouseDown?: (ev) => void

Defined in: react/components/types.ts:63

Pointer pressed (any button); the event carries button and x/y.

any

void

ComponentProps.onMouseDown


optional onMouseEnter?: (ev) => void

Defined in: react/components/types.ts:69

Pointer entered this widget’s region.

any

void

ComponentProps.onMouseEnter


optional onMouseLeave?: (ev) => void

Defined in: react/components/types.ts:71

Pointer left this widget’s region.

any

void

ComponentProps.onMouseLeave


optional onReorder?: (fromIndex, toIndex) => void

Defined in: react/components/layout/tabcontainer.tsx:17

Fired once when a drag-to-reorder ends at a different position than it started. The tab headers are already reordered live for visual feedback during the drag — reorder your own tab data in this callback so the new order survives the next render.

number

number

void


optional onScroll?: (ev) => void

Defined in: react/components/types.ts:67

Wheel / scroll event.

any

void

ComponentProps.onScroll


optional ref?: Ref<Widget>

Defined in: react/components/types.ts:30

Captures the underlying widget instance (React 19 ref-as-prop). Defaults to the base Widget; narrow it with a cast when you need a subclass field, e.g. ref={inputRef as React.Ref<InputWidget>}.

ComponentProps.ref


optional reorderable?: boolean

Defined in: react/components/layout/tabcontainer.tsx:10

Allow dragging a tab header to reorder tabs. Defaults to false.


optional style?: WidgetStyles

Defined in: react/components/types.ts:32

Inline styles for this widget — see the Styling guide.

ComponentProps.style


optional theme?: string

Defined in: react/components/types.ts:34

Re-theme this subtree; descendants resolve $tokens against it.

ComponentProps.theme


optional visible?: boolean

Defined in: react/components/types.ts:47

Whether the widget participates in layout/paint. Unlike conditionally omitting the element from the tree, visible={false} keeps it (and its subtree) mounted with its state intact — just skipped when measuring, laying out, and rendering. Defaults to true.

ComponentProps.visible