Segment Control - Skeleton

  1. components
  2. segment
  3. react

Segment Control

Capture input for a limited set of options.

States

Disable Group

Disable Item

Read-Only Group

Orientation

Set orientation="vertical" to enable a vertical layout.

Alternative

Consider using a Skeleton Button Group if you need finer grain control over the markup and styling.

API Reference

Segment

Property Type Description
orientation
"horizontal" | "vertical"
Set the orientation.
base
string
Sets base classes.
background
string
Set background classes.
border
string
Set border classes.
flexDirection
string
Set flex direction classes.
gap
string
Set gap classes.
padding
string
Set padding classes.
rounded
string
Set rounded classes.
width
string
Set width classes.
classes
string
Provide arbitrary CSS classes.
orientVertical
string
Set classes to provide a vertical layout.
orientHorizontal
string
Set classes to provide a horizontal layout.
stateDisabled
string
Set classes for the disabled state.
stateReadOnly
string
Set classes for the read-only state.
indicatorBase
string
Sets base classes to the indicator.
indicatorBg
string
Sets background classes to the indicator.
indicatorText
string
Sets text classes to the indicator.
indicatorRounded
string
Sets border radius classes to the indicator.
indicatorClasses
string
Provide arbitrary CSS classes to the indicator.
labelledby
string
Set aria-labelledby for element
onValueChange
Triggers when the value state is changed.
children
ReactNode
ids
The ids of the elements in the radio. Useful for composition.
value
string
The value of the checked radio
name
string
The name of the input fields in the radio (Useful for form submission).
form
string
The associate form of the underlying input.
disabled
boolean
If `true`, the radio group will be disabled
readOnly
boolean
Whether the checkbox is read-only
dir
"ltr" | "rtl"
The document's text/writing direction.
Default: "ltr"
getRootNode
A root node to correctly resolve document in custom environments. E.x.: Iframes, Electron.

SegmentItems

Property Type Description
base
string
Sets base classes.
classes
string
Provide arbitrary CSS classes.
stateDisabled
string
Set claseses for the disabled state.
stateFocused
string
Set claseses for the focus state.
labelBase
string
Sets base classes for the label element.
labelClasses
string
Provide arbitrary CSS classes for the label element.
children
ReactNode
value *
string
disabled
boolean