Start here
  • InstallationAdd Nelumbo to a shadcn project
  • ThemingBrand accent, neutrals, dynamic color
  • Biology componentsSequences, maps, plates and trees
  • katalyx.bio

    Tabs

    Switch between views of the same subject. One indicator slides and stretches between tabs on a spring, rather than each tab fading on its own.

    Install

    npx shadcn@latest add @nelumbo/tabs

    Pill

    The default, like shadcn's: a raised pill on a tonal track. Arrow keys move between tabs; Home and End jump to the ends.

    Account
    Your name and how people reach you.

    Underline

    Material's primary tabs: a 3px bar under the label on a hairline. Icons fill in on the active tab; a badge shows a count or a dot.

    12 unread conversations.

    Muted

    tone="muted" keeps the pill but swaps the solid selected tab for a soft raised one, for something more subtle.

    Showing all items.

    Full width and brand color

    fullWidth shares the width equally. The underline can use the accent.

    Bookings this day.
    Search flights for your trip.

    Scrolling

    When tabs don't fit, an underline list scrolls sideways and keeps the active tab in view.

    Things to do in Lisbon.

    Usage

    import { Tabs, TabsList, TabsTrigger, TabsContent } from "@/components/ui/tabs"​<Tabs defaultValue="inbox">  <TabsList variant="underline">    <TabsTrigger value="inbox" icon="inbox" badge={12}>Inbox</TabsTrigger>    <TabsTrigger value="sent" icon="send">Sent</TabsTrigger>  </TabsList>  <TabsContent value="inbox">…</TabsContent>  <TabsContent value="sent">…</TabsContent></Tabs>

    Props

    Tabs, TabsTrigger and TabsContent take Radix Tabs props (value, onValueChange, activationMode…).

    PropTypeDefaultNotes
    TabsList variant"pill" | "underline""pill"
    TabsList color"auto" | "neutral" | "brand""auto"Underline color
    TabsList tone"bold" | "muted""bold"Pill lists: a solid inverse pill, or a soft raised one
    TabsList fullWidthbooleanfalseTabs share the width
    TabsTrigger iconIconNameFills in when active
    TabsTrigger badgenumber | booleanA count, or a dot