Skip to content

Segmented Control

Free

Pick one value from a few options in one row. A pill slides to the choice, and the value goes with the form like a radio group.

  • Base UI
  • React 19
  • Tailwind CSS 4

Added Nov 8, 2026 · MIT + Commons Clause

Playground

Loading the preview

Props

Name it with aria-label or a FieldLabel. Each SegmentedControlItem has a value.

period-control.tsx

SegmentedControl

<div>
PropTypeDefaultDescription
fullWidthbooleanfalse
orientation"horizontal""vertical""horizontal"
rounded"default""full""default"
size"default""lg""sm""xs""default"
classNamestring—
From Base UIRadioGroupBase UI docs
disabledbooleanfalseWhether the component should ignore user interaction.
readOnlybooleanfalseWhether the user should be unable to select a different radio button in the group.
requiredbooleanfalseWhether the user must choose a value before submitting a form.
...props<div> attributes—Every other attribute goes to the <div>, with a ref.

SegmentedControlItem

<span>
PropTypeDefaultDescription
classNamestring—
From Base UIRadio.RootBase UI docs
valueRequiredValue—The unique identifying value of the radio in a group.
disabledboolean—Whether the component should ignore user interaction.
requiredboolean—Whether the user must choose a value before submitting a form.
...props<span> attributes—Every other attribute goes to the <span>, with a ref.
  • Use it for a few options that all stay in view.
  • Use name to send the value with a form.
  • Use fullWidth to fill the box with equal items, and orientation for a column.
  • Use value={null} to show no pill until people pick.
  • For many options, use a Select.
  • For one value that stays on or off, use a Switch.
  • For views with panels, use Tabs.
  • For many values at once, use a Toggle Group.
TabMoves focus to the control. The control is one tab stop.
Arrow keysMoves to the next or previous item and checks it. Right to left swaps them.
SpaceChecks the focused item.

It is a Base UI Radio Group with one tab stop. The arrow keys move the choice.

An icon-only item needs an aria-label.

It sends its value with a native form submit when it has a name.

  1. AddedSegmented Control.
Open the release