All components

Components · Controls

Tabs

A row of tabs with a marker that slides to the selected one.

Try itChange the motion setting at the top to feel each personality.

Use it

<Tabs tabs={[{ id: "learn", label: "Learn" }]} value={view} onChange={setView} label="Lesson views" />

How it moves

WhenRoleWhat moves
A different tab is selectedstate-changeThe marker slides to the new tab and takes its width, and the two labels swap color
First shownnoneThe marker is already under the selected tab. It does not slide in
The row is resizednoneThe marker is placed again without motion catching the eye

Rules:

Reduced motion: the marker still moves to the new tab, since its position is the state. It moves over the shortest duration with no spring.

Keyboard: left and right arrows move between tabs, and Home and End jump to the first and last.

CSS variables used: --ss-motion-state-change-spring, --ss-motion-state-change-spring-duration, --ss-motion-state-change-duration, --ss-motion-state-change-easing.