Component packs › Transit › Line Tabs

Line Tabs

The front of the pill drives to the new tab while the back catches up, so it stretches and leans on the move, and the labels change colour exactly where it covers them.

Line Tabs is a tabs from Transit, a component pack with 8 components: Navigation components drawn as one metro line. Price: $2 for the whole pack.

Built with: two-end pill, ink clip, 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.

Line Tabs props

PropTypeDefaultDescription
tabsLineTab[]
valuenumber
panelbooleantrueShow the demo panel under the tabs. Default true.
onChange(index: number) => void
theme'dark' | 'light'
autoplaybooleanShowcase mode: rides between tabs until touched.

Methods on the ref

Use it in React

import LineTabs from './LineTabs';

<LineTabs />

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

More in Transit

Good for: Navigation and menus.