Contour

No dependencies
Code format

Install with shadcn

Needs a free account token. Get a token

npx shadcn@latest add @movin/tab-contour

About this component

A strip of topographic map in a double neatline, tinted from teal lowland to a pale summit. The picked tab sits on the summit, and choosing another moves the whole mountain under the bar.

Triggers

  • Click
  • State change
  • Gradient

Techniques

  • @property
  • Radial gradient
  • SVG filter
  • CSS transition

Difficulty

Advanced

Moves on

Its code uses this curve. Open one to see it plotted and tune it.

Accessibility

Keyboard and screen readers

A WAI-ARIA tablist (aria-label "Activity") 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 mountain moves at once instead of travelling.

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

More tabs

See all
DripGet code
EnamelGet code
ExpressiveGet code
FerroGet code