Component packs › Tactile › Rubber Tabs
The active pill is a rubber band: the front edge shoots ahead, the back edge lags, it thins as it stretches, then snaps.
Rubber Tabs is a tabs from Tactile, a component pack with 6 components: Controls that behave like real materials. Price: $2 for the whole pack.
Built with: two-edge springs, volume-preserving stretch, hover tug.
Code: React and Next.js (TypeScript), Vue 3, plain HTML/CSS/JS, Tailwind CSS v4 and Motion (motion.dev). No npm packages needed. Keyboard accessible, with a reduced-motion version, in dark and light.
| Prop | Type | Default | Description |
|---|---|---|---|
tabs (required) | string[] | ||
value | number | 0 | Index of the selected tab. Default 0. |
label | string | Accessible name of the tab list, e.g. "Billing period". | |
onChange | (index: number) => void | ||
autoplay | number | false | Showcase mode: moves to a random tab every N ms. |
readonly value: numbersetValue(index: number): voiddestroy(): voidimport RubberTabs from './RubberTabs';
<RubberTabs
label="View"
tabs={["Overview","Activity","Settings","Billing"]}
/>The Vue, HTML, Next.js, Tailwind and Motion versions take the same options.
Good for: Micro-interactions.