StickyPanelProps
Defined in: react/components/overlay/sticky-panel.tsx:9
Props shared by every ztui React component (plus each component’s own props).
Extends
Section titled “Extends”Properties
Section titled “Properties”anchorRef?
Section titled “anchorRef?”
optionalanchorRef?:RefObject<Widget|null>
Defined in: react/components/overlay/sticky-panel.tsx:42
Anchor the panel to a widget (e.g. the chat input): pass a ref obtained from that widget. The panel sits flush above or below the anchor — see placement — and tracks it as the layout changes. When omitted, the panel is positioned at the screen offsets in panelStyle.
const inputRef = useRef<InputWidget>(null);<Input ref={inputRef} /><StickyPanel anchorRef={inputRef} placement="above">…</StickyPanel>children?
Section titled “children?”
optionalchildren?:ReactNode
Defined in: react/components/types.ts:38
Child elements.
Inherited from
Section titled “Inherited from”className?
Section titled “className?”
optionalclassName?:string
Defined in: react/components/types.ts:24
Space-separated class names (currently advisory; no CSS cascade).
Inherited from
Section titled “Inherited from”closeOnEscape?
Section titled “closeOnEscape?”
optionalcloseOnEscape?:boolean
Defined in: react/components/overlay/sticky-panel.tsx:27
Esc dismisses the panel (calls onClose). Defaults to true.
disabled?
Section titled “disabled?”
optionaldisabled?:boolean
Defined in: react/components/types.ts:52
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.
Inherited from
Section titled “Inherited from”focusable?
Section titled “focusable?”
optionalfocusable?:boolean
Defined in: react/components/types.ts:40
Allow this widget to take keyboard focus.
Inherited from
Section titled “Inherited from”focusOnClick?
Section titled “focusOnClick?”
optionalfocusOnClick?:boolean
Defined in: react/components/types.ts:46
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.
Inherited from
Section titled “Inherited from”hoverInterest?
Section titled “hoverInterest?”
optionalhoverInterest?:boolean
Defined in: react/components/types.ts:66
Opt-in hint that this widget cares about passive hover movement.
Inherited from
Section titled “Inherited from”
optionalid?:string
Defined in: react/components/types.ts:22
Stable identifier, handy for tests and lookups.
Inherited from
Section titled “Inherited from”label?
Section titled “label?”
optionallabel?:string
Defined in: react/components/types.ts:36
Structural/accessible label (also the tab title inside TabContainer).
Inherited from
Section titled “Inherited from”onClick?
Section titled “onClick?”
optionalonClick?: (ev) =>void
Defined in: react/components/types.ts:54
Pointer click.
Parameters
Section titled “Parameters”any
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”onClose?
Section titled “onClose?”
optionalonClose?: () =>void
Defined in: react/components/overlay/sticky-panel.tsx:29
Called when the panel asks to close (Esc). Drive your open state here.
Returns
Section titled “Returns”void
onDragEnd?
Section titled “onDragEnd?”
optionalonDragEnd?: (x,y,moved) =>void
Defined in: react/components/types.ts:72
Drag released; moved is false for a tap with no movement.
Parameters
Section titled “Parameters”number
number
boolean
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”onDragMove?
Section titled “onDragMove?”
optionalonDragMove?: (x,y) =>void
Defined in: react/components/types.ts:70
Pointer moved while dragging from this widget.
Parameters
Section titled “Parameters”number
number
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”onDragStart?
Section titled “onDragStart?”
optionalonDragStart?: (x,y) =>void
Defined in: react/components/types.ts:68
Pointer-drag lifecycle; moved is false for a tap with no movement.
Parameters
Section titled “Parameters”number
number
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”onKey?
Section titled “onKey?”
optionalonKey?: (ev) =>void
Defined in: react/components/types.ts:58
Key event while focused; set ev.handled to consume it.
Parameters
Section titled “Parameters”any
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”onKeyIntercept?
Section titled “onKeyIntercept?”
optionalonKeyIntercept?: (ev) =>void
Defined in: react/components/overlay/sticky-panel.tsx:25
Sees key events before they reach the focused control below, so the panel
can claim navigation keys (↑/↓/Enter) while ordinary typing still flows to
the focused input. Call ev.handled = true to consume the key; leave it
alone to let it pass through.
onKeyIntercept={(ev) => { if (ev.name === "down") { moveSelection(1); ev.handled = true; } if (ev.name === "enter") { choose(); ev.handled = true; }}}Parameters
Section titled “Parameters”KeyEvent
Returns
Section titled “Returns”void
onMouseDown?
Section titled “onMouseDown?”
optionalonMouseDown?: (ev) =>void
Defined in: react/components/types.ts:56
Pointer pressed (any button); the event carries button and x/y.
Parameters
Section titled “Parameters”any
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”onMouseEnter?
Section titled “onMouseEnter?”
optionalonMouseEnter?: (ev) =>void
Defined in: react/components/types.ts:62
Pointer entered this widget’s region.
Parameters
Section titled “Parameters”any
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”onMouseLeave?
Section titled “onMouseLeave?”
optionalonMouseLeave?: (ev) =>void
Defined in: react/components/types.ts:64
Pointer left this widget’s region.
Parameters
Section titled “Parameters”any
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”onScroll?
Section titled “onScroll?”
optionalonScroll?: (ev) =>void
Defined in: react/components/types.ts:60
Wheel / scroll event.
Parameters
Section titled “Parameters”any
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”
optionalopen?:boolean
Defined in: react/components/overlay/sticky-panel.tsx:11
Whether the panel is shown. Defaults to true.
panelStyle?
Section titled “panelStyle?”
optionalpanelStyle?:WidgetStyles
Defined in: react/components/overlay/sticky-panel.tsx:50
Style overrides for the panel box. Set width here; when not anchored, also
left/top/right/bottom to position it. The panel is always clamped to
stay fully on-screen.
placement?
Section titled “placement?”
optionalplacement?:OverlayPlacement
Defined in: react/components/overlay/sticky-panel.tsx:44
Side of the anchor to prefer (default auto: above only if below won’t fit).
optionalref?: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>}.
Inherited from
Section titled “Inherited from”style?
Section titled “style?”
optionalstyle?:WidgetStyles
Defined in: react/components/types.ts:32
Inline styles for this widget — see the Styling guide.
Inherited from
Section titled “Inherited from”theme?
Section titled “theme?”
optionaltheme?:string
Defined in: react/components/types.ts:34
Re-theme this subtree; descendants resolve $tokens against it.