- components
 - ›
 - segmented control
 - ›
 - react
 
Segmented Control
Capture input for a limited set of options.
Label
Icons
Orientation
Read Only
Disabled
Disabled Item
Direction
Label
API Reference
Root
| Property | Default | Type | 
|---|---|---|
 ids  |  - |    Partial<{ root: string; label: string; indicator: string; item: (value: string) => string; itemLabel: (value: string) => string; itemControl: (value: string) => string; itemHiddenInput: (value: string) => string; }> | undefined The ids of the elements in the radio. Useful for composition.  |  
 value  |  - |    string | null | undefinedThe controlled value of the radio group  |  
 defaultValue  |  - |    string | null | undefinedThe initial value of the checked radio when rendered. Use when you don't need to control the value of the radio group.  |  
 name  |  - |    string | undefinedThe name of the input fields in the radio (Useful for form submission).  |  
 form  |  - |    string | undefinedThe associate form of the underlying input.  |  
 disabled  |  - |    boolean | undefinedIf `true`, the radio group will be disabled  |  
 readOnly  |  - |    boolean | undefinedWhether the checkbox is read-only  |  
 onValueChange  |  - |    ((details: ValueChangeDetails) => void) | undefinedFunction called once a radio is checked  |  
 orientation  |  - |    "horizontal" | "vertical" | undefinedOrientation of the radio group  |  
 dir  |  "ltr" |    "ltr" | "rtl" | undefinedThe document's text/writing direction.  |  
 getRootNode  |  - |    (() => ShadowRoot | Node | Document) | undefinedA root node to correctly resolve document in custom environments. E.x.: Iframes, Electron.  |  
 element  |  - |    ((attributes: HTMLAttributes<"div">) => Element) | undefinedRender the element yourself  |  
RootProvider
| Property | Default | Type | 
|---|---|---|
 value  |  - |    RadioGroupApi<PropTypes>  |  
 element  |  - |    ((attributes: HTMLAttributes<"div">) => Element) | undefinedRender the element yourself  |  
RootContext
| Property | Default | Type | 
|---|---|---|
 children  |  - |    (ratingGroup: RadioGroupApi<PropTypes>) => ReactNode  |  
Label
| Property | Default | Type | 
|---|---|---|
 element  |  - |    ((attributes: HTMLAttributes<"span">) => Element) | undefinedRender the element yourself  |  
Control
| Property | Default | Type | 
|---|---|---|
 element  |  - |    ((attributes: HTMLAttributes<"div">) => Element) | undefinedRender the element yourself  |  
Indicator
| Property | Default | Type | 
|---|---|---|
 element  |  - |    ((attributes: HTMLAttributes<"div">) => Element) | undefinedRender the element yourself  |  
Item
| Property | Default | Type | 
|---|---|---|
 value  |  - |    string  |  
 disabled  |  - |    boolean | undefined  |  
 invalid  |  - |    boolean | undefined  |  
 element  |  - |    ((attributes: HTMLAttributes<"label">) => Element) | undefinedRender the element yourself  |  
ItemText
| Property | Default | Type | 
|---|---|---|
 element  |  - |    ((attributes: HTMLAttributes<"span">) => Element) | undefinedRender the element yourself  |  
ItemHiddenInput
| Property | Default | Type | 
|---|---|---|
 element  |  - |    ((attributes: HTMLAttributes<"input">) => Element) | undefinedRender the element yourself  |