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) -> NoneparamitemsIterable[Any]Item records used by generated child components or static search sources.
paramvaluestrSynchronized component value.
paramlabelstrVisible or accessible label for the component.
paramsizestr | None= NoneControl size.
paramlayoutstr | None= NoneHug or fill segment layout.
paramdisabledbool= FalseWhether the entire control is disabled.
parampropsAny= {}Returns
None