Skip to content
Motionbits

Tabs and segmented controlsFreeNew

Tumble Tabs

Tabs shouldn't slide. They should roll. A solid square tumbles over its leading corner to the chosen tab, and each label inverts as the square passes over it.

Get the code for Tumble Tabs
Save Tumble Tabs: sign in first

Free. Create a free account to copy the source. Read the release note

Tumble Tabs

Component 02 · React + WAAPI

Live preview

Starter

For side projects and first launches.

  • 3 projects
  • Community support
  • Light and dark

Pro

For one team shipping every week.

  • Unlimited projects
  • Priority support
  • Version history

Team

For product teams that review together.

  • Shared libraries
  • Roles and approvals
  • Audit log

Scale

For orgs with more than one brand.

  • Single sign-on
  • Custom limits
  • Dedicated support

Click a plan, or focus the tabs and use the arrow keys.

Any tab set

Billing toggle

Filter

Get it into your app

Three steps. Copy the files and you're done; nothing to install.

SoonCLI and MCP install

  1. Step 1: Get it

    The source is free with an account, free forever. You come straight back to this page.

  2. Step 2: Add it

    Paste the files into src/components/motionbits/, keeping the paths.

    • tumble-tabs/tumble-tabs.tsx
    • tumble-tabs/tumble-tabs.css
    • quarter-turn.ts
    • tumble-tabs/index.ts

    Needs react and react-dom. No other packages to install.

  3. Step 3: Use it

    Import it and drop it in. Usage and props are just below.

    import { TumbleTabs } from "@/components/motionbits/tumble-tabs";

Usage

import { TumbleTabs } from "@/components/motionbits/tumble-tabs";
 
const tabs = [
  { id: "starter", label: "Starter", panel: <Plan name="Starter" /> },
  { id: "pro", label: "Pro", panel: <Plan name="Pro" /> },
  { id: "team", label: "Team", panel: <Plan name="Team" /> },
  { id: "scale", label: "Scale", panel: <Plan name="Scale" /> },
];
 
export function Plans() {
  return (
    <TumbleTabs
      tabs={tabs}
      defaultValue="starter"
      size={96}
      stepMs={110}
      aria-label="Plans"
    />
  );
}

Props

Tumble Tabs props
PropTypeDefaultWhat it does
tabs{ id: string; label: ReactNode; panel?: ReactNode }[]—The tabs, in order. Each panel shows under the strip while its tab is selected.
value / defaultValuestring—Controlled or uncontrolled selected tab id. The first tab is selected by default.
onValueChange(id: string) => void—Called when the selection changes from a click or the keyboard.
sizenumber72Side of each square tab in px. It shrinks to fit narrow containers.
stepMsnumber110Time for one 90° step. Longer jumps take one step per tab of distance.
arcnumber6Height of the hop, in px, on jumps of two or more tabs.
panelTiltnumber3Degrees the panel tips in from the landing corner.
refTumbleTabsHandle—select(id, { seekMs }) and reset(id), for driving the control from code.

Accessibility

  • WAI-ARIA tabs: a tablist with roving tabindex, tabpanels tied to their tabs, and the selected tab exposed with aria-selected.
  • Arrow keys move one tab and tumble one step. Home and End jump to the first and last tab.
  • The inverted labels that ride inside the square are decorative and hidden from assistive technology.
  • The focus ring rides the square, so it stays visible on the selected tab in both themes.

Motion

  • The square rolls in 90° steps about its leading bottom corner, one step per tab of distance at 110ms a step.
  • Long jumps add a 6px hop. On landing the corner dot pops (0.3s) and the square settles back 2° over 0.4s.
  • Only transform and opacity animate, and every layer is composited, so the roll holds 60fps.
  • With reduced motion the square moves instantly and fades in over 0.15s, and the panels crossfade.