Skip to content

Component gallery

  1. Forms
  2. Segmented controls

Primitives

  • Buttons30
  • Badges21
  • Keys4
  • Status8
  • Avatars8
  • Alerts4
  • Cards10
  • Dropdowns4
  • Corner windows3
  • Dialogs7
  • Windows4
  • Taskbar1
  • Launcher1
  • Desk icons1
  • Progress8
  • Scroll cues2

Forms

  • Toggles5
  • Selects3
  • Inputs8
  • Textareas7
  • Segmented controls4
  • Attachments18

Content

  • Quotes5
  • Stats5
  • Heatmap3
  • Icon lists2
  • Masonry2
  • Accordion2
  • Code8
  • Contact methods7

Chat

  • Messages22
  • Posts29

Showcase

  • Media cards4
  • Logos1
  • 88x31s15
  • Carousel3
  • Blueprint frames2
  • Card grids3

Media

  • Figures4
  • Audio player4
  • Media player3
  • Radio5
  • Shorts2

Toys

  • Terminal4
  • Destructor1
  • Status board7

Sections

  • Section3
  • Side hero2
  • Navbar5
  • Footer1
  • Sidebar2

Display

ThemeT
Mode
Mode
M
Style
Style
Y
Spacing
Spacing
Radius
Radius
Font size
Font size
Compare
Compare
Effects
S

ShortcutsAlt+Shift+key

Components

Primitives

  • Buttons30
  • Badges21
  • Keys4
  • Status8
  • Avatars8
  • Alerts4
  • Cards10
  • Dropdowns4
  • Corner windows3
  • Dialogs7
  • Windows4
  • Taskbar1
  • Launcher1
  • Desk icons1
  • Progress8
  • Scroll cues2

Forms

  • Toggles5
  • Selects3
  • Inputs8
  • Textareas7
  • Segmented controls4
  • Attachments18

Content

  • Quotes5
  • Stats5
  • Heatmap3
  • Icon lists2
  • Masonry2
  • Accordion2
  • Code8
  • Contact methods7

Chat

  • Messages22
  • Posts29

Showcase

  • Media cards4
  • Logos1
  • 88x31s15
  • Carousel3
  • Blueprint frames2
  • Card grids3

Media

  • Figures4
  • Audio player4
  • Media player3
  • Radio5
  • Shorts2

Toys

  • Terminal4
  • Destructor1
  • Status board7

Sections

  • Section3
  • Side hero2
  • Navbar5
  • Footer1
  • Sidebar2

Forms · 5 of 6

Segmented controls

Plain radios: they submit with a form and can drive CSS via :has().

packages/ui/src/astro/ui/segmented-control.astro4 stories

Preview settings
Width
Preview width
Stage
Stage
text
Props of text
<SegmentedControl name="story-segmented-text" label="View" options={[{ value: "list", label: "List" }, { value: "grid", label: "Grid" }, { value: "board", label: "Board" }]} value="grid" />
Open segmented-control/text on its own
View
icons
Props of icons
<SegmentedControl name="story-segmented-icons" label="Alignment" options={[{ value: "left", label: "Align left", icon: "lucide:align-left" }, { value: "center", label: "Align center", icon: "lucide:align-center" }, { value: "right", label: "Align right", icon: "lucide:align-right" }]} value="left" />
Open segmented-control/icons on its own
Alignment
small
Props of small
<SegmentedControl name="story-segmented-small" label="View" options={[{ value: "list", label: "List" }, { value: "grid", label: "Grid" }, { value: "board", label: "Board" }]} value="list" size="sm" />
Open segmented-control/small on its own
View
disabled
Props of disabled
<SegmentedControl name="story-segmented-disabled" label="View" options={[{ value: "list", label: "List" }, { value: "grid", label: "Grid" }, { value: "board", label: "Board" }]} value="grid" disabled />
Open segmented-control/disabled on its own
View
PreviousTextareasNextAttachments