ns-ui

Tabs Carriage

Tabs whose underline is a typewriter carriage on a rail — forward moves glide on a spring and stretch with speed, backward moves snap home faster with a ding-bounce, and the panel line-feeds in from the travel direction.

Use when the switch itself should feel mechanical and directional, the underline springing, stretching with its own velocity, and returning faster on a backward move than a forward one while the panel line-feeds in from the travel direction; pick tabs-notch-tenon instead when the active tab must be identifiable in a still frame with no motion at all, or tabs-rail-points when the indicator should retain where the selection came from after it arrives.

Install

npx shadcn add https://design.helpmarq.com/r/tabs-carriage.json
  • tabs
  • navigation
  • spring
  • physics
  • indicator
  • keyboard

ns-ui / tabs-carriage — the indicator is a carriage on a rail

The carriage rides the rail. Click a tab to the right and it glides over on a spring, stretching with speed. Click back left and it returns the way a typewriter carriage does — faster, with a small ding on arrival.

Props

PropTypeDefaultDescription
tabsCarriageTab[]
defaultTab?stringid of the initially selected tab (defaults to the first)
className?string