AnyLumino
API referenceastryxsurfaces

SegmentedControl

Render a compact Astryx segmented control.

Astryx Props

JSON-safe SegmentedControl props forwarded to Astryx.

Supported Astryx props include:

  • value (string; required): The currently selected value (controlled).
  • onChange ((value: string) => void; required): Callback fired when a segment is selected.
  • label (string; required): Accessible label for the radio group (used as aria-label, never rendered visually).
  • size ('sm' or 'md' or 'lg'): Size variant for the control.
  • layout ('hug' or 'fill'): Layout mode. hug (default) sizes segments to content; fill stretches them equally to fill the container.
  • isDisabled (boolean): Whether the entire control is disabled.
  • children (ReactNode; required): SegmentedControlItem children.
  • xstyle (StyleXStyles): StyleX styles for layout customization (margins, positioning, sizing). Must be a stylex.create() value: not an inline style object like style={{}}.

Props typed as React nodes, render functions, event handlers, refs, or StyleX styles are documented for Astryx parity but cannot be serialized directly from Python unless the wrapper adapts them.

See Astryx component docs: https://astryx.atmeta.com/components/SegmentedControl.

Functions

constructor__init__(items, value, *, label, size=None, layout=None, disabled=False, **props) -> None
paramitemsIterable[Any]

Item records used by generated child components or static search sources.

paramvaluestr

Synchronized component value.

paramlabelstr

Visible or accessible label for the component.

paramsizestr | None
= None

Control size.

paramlayoutstr | None
= None

Hug or fill segment layout.

paramdisabledbool
= False

Whether the entire control is disabled.

parampropsAny
= {}

Returns

None

On this page