Tabs

Switch between panels with an underlined tab bar.

CSS onlyKeyboard
12 projects, 3 in review.
Last change 5 minutes ago.
Notifications and team permissions.
BackgroundGridAccent

Corners

SharpDefaultRound

Shadow

NoneNoneStrong

Motion

NoneDefaultBounce
<style>
.ux-tabs{display:flex;flex-wrap:wrap;width:100%;max-width:280px;font:15px system-ui;color:var(--fg,#14151a)}
.ux-tabs input{position:absolute;opacity:0}
.ux-tabs label{padding:8px 12px;margin-bottom:-1px;border-bottom:2px solid transparent;color:var(--muted,#6b6f7b);font-weight:500;cursor:pointer;transition:color var(--dur,.15s) var(--ease,ease),border-color var(--dur,.15s) var(--ease,ease)}
.ux-tabs input:checked+label{color:var(--fg,#14151a);border-color:var(--accent,#cc4a26)}
.ux-tabs input:focus-visible+label{outline:2px solid var(--accent,#cc4a26);border-radius:calc(6px * var(--r,1))}
.ux-tabs::before{content:"";order:1;flex-basis:100%;height:0;border-top:1px solid var(--line,#cfd2da);margin-top:0}
.ux-p{display:none;order:2;flex-basis:100%;padding:16px 4px;color:var(--muted,#6b6f7b)}
#ux-t1:checked~.ux-p1,#ux-t2:checked~.ux-p2,#ux-t3:checked~.ux-p3{display:block}
</style>

<div class="ux-tabs">
  <input type="radio" name="ux-tabs" id="ux-t1" checked><label for="ux-t1">Overview</label>
  <input type="radio" name="ux-tabs" id="ux-t2"><label for="ux-t2">Activity</label>
  <input type="radio" name="ux-tabs" id="ux-t3"><label for="ux-t3">Settings</label>
  <div class="ux-p ux-p1">12 projects, 3 in review.</div>
  <div class="ux-p ux-p2">Last change 5 minutes ago.</div>
  <div class="ux-p ux-p3">Notifications and team permissions.</div>
</div>

When to use it

Use this to help people move around your product or understand where they are, rather than to submit data or trigger a one-off action.

Accessibility

It is fully keyboard operable: tab to it and use the keys you would expect (space, enter or the arrow keys) to change its value, with a visible focus ring so sighted keyboard users can always see where they are. It has no JavaScript dependency, so it keeps working if a script fails to load, and it is built on native form controls or semantics rather than divs pretending to be one. Colors are read from CSS custom properties, so they follow your light or dark theme and you can raise contrast globally without touching this component.