Component packs › Tactile › Rubber Tabs

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.

Rubber Tabs props

PropTypeDefaultDescription
tabs (required)string[]
valuenumber0Index of the selected tab. Default 0.
labelstringAccessible name of the tab list, e.g. "Billing period".
onChange(index: number) => void
autoplaynumber | falseShowcase mode: moves to a random tab every N ms.

Methods on the ref

Use it in React

import RubberTabs from './RubberTabs';

<RubberTabs
  label="View"
  tabs={["Overview","Activity","Settings","Billing"]}
/>

The Vue, HTML, Next.js, Tailwind and Motion versions take the same options.

More in Tactile

Good for: Micro-interactions.