Segmented Control

Picks one value from a few and is never empty; the selection slides between equal-width items.

DayWeekMonth

Installation

npx yolkui add segmented-control

Sizes and pill

The same heights, padding and type as Button. Every item is as wide as the widest one, so the control reads as one piece.

xs · 28
DayWeekMonth
DayWeekMonth
sm · 32
DayWeekMonth
DayWeekMonth
default · 36
DayWeekMonth
DayWeekMonth
lg · 40
DayWeekMonth
DayWeekMonth

Full width

Give it a width and the items share it equally.

MonthlyYearlyLifetime

Icons

Icons follow Button's spacing. An icon-only item is square and needs an aria-label.

LightDarkSystem

Disabled

A disabled item fades to 60% and cannot be picked.

StandardExpressSame day