Tabs

A component for toggling between related panels on the same page.

Profile Settings

Update your public profile information.

Installation

pnpm dlx shadcn@latest add @lumi-ui/tabs

Basic Usage

import { Tabs, TabsListContent, TabsPanel, TabsTab } from "@/registry/ui/tabs";
<Tabs>
  <TabsListContent>
    <TabsTab>Tab 1</TabsTab>
    <TabsTab>Tab 2</TabsTab>
  </TabsListContent>
  <TabsPanel>Content 1</TabsPanel>
  <TabsPanel>Content 2</TabsPanel>
</Tabs>

Anatomy

 <Tabs>
   <TabsListContent>
     <TabsTab/>
   </TabsListContent>
   <TabsPanel/>
 </Tabs>

Cookbook

Underline

Profile Settings

Update your public profile information.

Ghost

Ignore the TabsIndicator if you're only styling text.

Tab One

API Reference

Primitives

ComponentDescription
TabsGroups the tabs and the corresponding panels. Renders a <div> element.
TabsListGroups the individual tab buttons. Renders a <div> element.
TabsTabAn individual interactive tab button that toggles the corresponding panel. Renders a <button> element.
TabsIndicatorA visual indicator that can be styled to match the position of the currently active tab. Renders a <span> element.
TabsPanelA panel displayed when the corresponding tab is active. Renders a <div> element.

Composite Component

ComponentDescription
TabsListContentA composite component that wraps the TabsList and TabsIndicator components. Default "pill" like styles.