Skip to main content
Clever Ops

Physics Underline Tabs

The classic underline tabs with real physics, the active bar travels on an underdamped spring with velocity-linked squash and one visible overshoot, over correct APG tablist semantics.

Preview & code

Loading Physics Underline Tabs preview

Installation

pnpm dlx shadcn@latest add @cleverui/tabs-underline-physics

Requires the @cleverui registry in your components.json, a one-off, two-line setup.

Usage

tsx
import { TabsUnderlinePhysics } from '@/components/ui/tabs-underline-physics'
Exampletsx
import { TabsUnderlinePhysics } from '@/components/ui/tabs-underline-physics'

export default function TabsUnderlinePhysicsDemo() {
  return (
    <div className="mx-auto w-full max-w-xl px-4 py-10 sm:px-6 sm:py-14">
      <p className="mb-6 font-mono text-[11px] uppercase tracking-[0.2em] text-muted-foreground sm:text-xs">
        Spec sheet · Query engine
      </p>
      <TabsUnderlinePhysics
        defaultIndex={0}
        ariaLabel="Engine specifications"
        items={[
          {
            label: 'Latency',
            content: (
              <p>
                Median interactive query returns in 180 ms on the included
                warehouse pool. Cold starts after 15 minutes idle add ~40 ms for
                credential refresh; keep a warm pool on Business if boards must
                stay sub-150 ms under load.
              </p>
            ),
          },
          {
            label: 'Throughput',
            content: (
              <p>
                Pro seats include 40,000 query minutes per month. Concurrent
                runners cap at 8 per workspace on Pro and 32 on Business.
                Burst above the cap queues FIFO for up to 90 seconds before a
                soft failure with a retry token.
              </p>
            ),
          },
          {
            label: 'Retention',
            content: (
              <p>
                Result cache lives 24 hours on Free, 7 days on Pro, and 30 days
                on Business. Query history is retained 90 / 365 days respectively.
                Purge either from Settings → Data residency; the action is
                irreversible within 60 seconds of confirm.
              </p>
            ),
          },
          {
            label: 'Regions',
            content: (
              <p>
                Compute pins to us-east-1, eu-west-1, or ap-southeast-2 at
                signup. Cross-region joins route through a private fabric and
                never stage credentials outside the source VPC when the private
                connector is enabled.
              </p>
            ),
          },
        ]}
      />
    </div>
  )
}

API reference

TabsUnderlinePhysics accepts the following props.

PropTypeDefaultDescription
items*TabsUnderlinePhysicsItem[]2–5 tabs; demo content is short spec-sheet paragraphs so swaps stay legible
defaultIndexnumber0tab selected on first render (SSR-rendered selected)
ariaLabelstring'Content tabs'accessible name for the tablist

…plus everything from React.HTMLAttributes<HTMLDivElement>: className, event handlers, aria attributes and the rest pass straight through.

Referenced types

Typestsx
export interface TabsUnderlinePhysicsItem {
  label: string
  content: React.ReactNode
}

Frequently asked questions

How do I install the Physics Underline Tabs component?

Register the @cleverui registry in your components.json ("@cleverui": "https://cleverops.com.au/r/{name}.json"), then run `npx shadcn@latest add @cleverui/tabs-underline-physics`. The shadcn CLI copies the source into your project, you own the code from that point. You can also copy the source directly from this page.

What dependencies does Physics Underline Tabs require?

Physics Underline Tabs uses motion on top of React and Tailwind CSS. You don't need to install it manually, the shadcn CLI resolves and installs npm dependencies automatically when you add the component.

Can I theme Physics Underline Tabs to match my brand?

Yes. The component is styled entirely with Tailwind utilities over standard design tokens (primary, background, muted, border), so it inherits your existing shadcn/ui theme automatically. Change your CSS variables and the component follows, no source edits needed for palette, radius, or fonts.

Want this built for you?

CleverUI is built by the Clever Ops web team. If you'd rather ship a hand-coded, fast, custom website than assemble one, we build them for Australian businesses every week.

Explore web development services