Skip to content
Ballpoint

Tabs

The chosen tab boxed or underlined by hand; the mark slides across and redraws to fit.

From shadcn/ui
Built on Base UI Tabs
Your name and the address on your letters.
The underline slides to the chosen tab and is redrawn to fit it.

Installation

pnpm dlx shadcn@latest add @ballpoint/tabs

Usage

tsx
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"

<Tabs defaultValue="account">
  <TabsList>
    <TabsTrigger value="account">Account</TabsTrigger>
    <TabsTrigger value="password">Password</TabsTrigger>
  </TabsList>
  <TabsContent value="account">…</TabsContent>
  <TabsContent value="password">…</TabsContent>
</Tabs>

Examples

Vertical

Tabs stacked beside their panel.

Your name, photo and the address on your letters.

With icons

Icons beside the labels.

Scribbles and lists.

Settings

Tabs holding cards of fields, the way an account page does.

Account
Your name and the address on your letters.

With counts

Underlined tabs with a badge each, read from state.

  • Dear Ada, the ink arrived.
  • A postcard from the lake.
  • Your notebook has shipped.

API reference

TabsList variant
default "default"
"default" | "line"

Box the chosen tab, or underline it.

TabsList seed
string | number

Pins the drawing.

Every other prop goes to Base UI's Tabs.

Pen settings

The drawing also takes roughness, passes, radius, corners, weight and speed, as props or from the nearest InkProvider. What each one does.