Skip to content

    Browse components

    Tabs

    Accessible tabs with a spring-animated pill or underline indicator, roving arrow-key focus, direction-aware panel transitions and lazily mounted panels that keep their state.

    Open
    Customize
    pill
    underline
    horizontal
    vertical
    automatic
    manual

    Installation

    npx shadcn@latest add @glint-ui/tabs

    First time using @glint-ui? Add the registry to components.json once, or install by URL: npx shadcn@latest add https://glintui.vercel.app/r/tabs.json

    Usage

    import { Tabs } 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>

    Props

    PropTypeDefaultDescription
    variant"pill" | "underline""pill"Indicator style.
    orientation"horizontal" | "vertical""horizontal"Tab list direction and arrow keys.
    activationMode"automatic" | "manual""automatic"Select on arrow focus, or on Enter/Space.
    defaultValuestring—Initially selected tab (uncontrolled).
    valueReactNode—Selected tab (controlled, with onValueChange).
    childrenReactNode—TabsList with TabsTrigger items, then TabsContent panels.
    classNamestring—Extra classes for the root element.