Bauhaus

No dependencies
Code format

Install with shadcn

Needs a free account token. Get a token

npx shadcn@latest add @movin/tab-bauhaus

About this component

Three tabs, three primaries: a red circle, a blue square and a yellow triangle beside lowercase labels between two black rules. The picked tab fills with its colour from the bottom up and its shape turns over.

Triggers

  • Click
  • State change
  • Fill

Techniques

  • CSS variables
  • CSS transition
  • Pseudo elements
  • clip-path

Difficulty

Beginner

Accessibility

Keyboard and screen readers

A WAI-ARIA tablist (aria-label "Chapters") of buttons with role="tab", aria-selected and aria-controls, a roving tabindex, Left and Right arrow keys plus Home and End, and one tabpanel per tab; :focus-visible outlines the tab. Every drawn part is aria-hidden.

Reduced motion

The transitions and loops are switched off, so the selection changes at once.

Use it in anything you build, commercial and client work included. Licence

More tabs

See all

BlueprintGet code

BorealisGet code

BrutGet code

BuoyGet code