Skip to content

Pill Nav

Accessible tabs (tablist, arrow keys, Home and End) with a pill that slides on a spring: the leading edge arrives first and stretches the pill as it crosses.

Plan
Free · MIT
Dependencies
React only
Props
11 (6 adjustable)

Free forever

MIT license, for personal and commercial projects. See installation

Made with Furin: Pill Nav · Metal Button · Copy Morph

Props

PropTypeDefaultDescription
tabs(string | { value, label, badge? })[]"Overview, Activity, Team, Settings"Tabs: strings or { value, label, badge }.
valuestring""Active tab (controlled mode).
defaultValuestring""Initial tab (uncontrolled mode).
onChange(value: string) => void""Called when another tab is selected.
panelsRecord<string, ReactNode>""Content of each panel, keyed by tab value (optional).
labelstring"Sections"Accessible label for the tab list.
stiffnessnumber380Stiffness of the pill's spring: higher feels snappier.
dampingnumber0.6Bounce of the pill: 0.4 overshoots and returns, 1 arrives without bouncing.
colorstring"#F3F4F7"Color of the pill.
activeTextColorstring"#0B0C0F"Text color on top of the pill.
autoplaynumber0Seconds between automatic changes (0 = off; it stops on interaction).

Installation

Install it

1Install the package

npm i furin-ui

2Import it

import { PillNav } from "furin-ui";

Also with pnpm add furin-ui, yarn add furin-ui or bun add furin-ui. Each component ships its own CSS and imports it for you.

Dependencies

React
18 or later
Other libraries
none
License
MIT

Each file ships its own CSS: there's nothing else to install.

Keep exploring

  • An accessible accordion (aria-expanded, regions, arrow keys, Home and End) whose regions open on a real spring: the height bounces as it lands and the content comes in from blurry to sharp.

    Navigation

  • A tooltip (role tooltip) that follows the cursor on a spring and hangs from it like a tag: it tilts with speed and stretches a little as it moves. It also appears on keyboard focus.

    Navigation

  • Steps with a progress line that fills from one node to the next; the new step lights up as the stroke arrives and the checkmark draws itself on completion.

    Navigation