Component packs › Ferro › Polarity Tabs
A bar magnet slides under the tabs, stretching with speed, while a strip of filings swings round to follow its field.
Polarity Tabs is a tabs from Ferro, a component pack with 7 components: Components that behave like magnets. Price: $5 for the whole pack.
Built with: dipole filings, speed stretch, tablist keys.
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 | PolarityTab[] | ||
index | number | Index selected at start. | |
onChange | (i: number) => void | Called when the tab changes. | |
autoplay | boolean | Showcase mode: steps through the tabs until touched. |
select(i: number): voiddestroy(): voidimport PolarityTabs from './PolarityTabs';
<PolarityTabs />The Vue, HTML, Next.js, Tailwind and Motion versions take the same options.
Good for: Micro-interactions.