Breadcrumb
Show where a page sits in a hierarchy.
Switch between related content in the same context.
npx shadcn@latest add @silicon-ui/tabsnpx shadcn@latest add @silicon-ui/tabsInstall the dependencies.
npm install @radix-ui/react-tabs lucide-react motionCopy these files into your project. Shared files are skipped if you already have them.
components/silicon-ui/tabs/tabs.tsxcomponents/silicon-ui/tabs/tabs.module.cssInstall the foundation once per app for the design and motion tokens: npx shadcn@latest add @silicon-ui/silicon-foundation
TabsAccepts the props of TabsProps.
TabsListAccepts the props of TabsListProps.
TabsTrigger| Prop | Type | Default |
|---|---|---|
iconAn icon before the label, such as a 16px Lucide icon. It is sized, coloured with the label (muted, then the active colour when selected) and hidden from screen readers. For an icon-only tab, leave out the label and pass `aria-label`. | ReactNode | — |
Also accepts the props of ComponentPropsWithoutRef<typeof TabsPrimitive.Trigger>.
TabsContentAccepts the props of TabsContentProps.