Tabs

A set of layered sections of content—known as tab panels—that are displayed one at a time.

Installation

npx shadcn@latest add https://spoke.georgedrury.co.uk/r/tabs

Lineage

Anatomy

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

export default () => (
	<Tabs>
		<TabsList>
			<TabsTrigger />
		</TabsList>
		<TabsContent />
	</Tabs>
)

Spoke utility classes

ClassFallback chainDescription
--tabs-listvar(--muted)Colour for list tabs variant
--tabs-list-foregroundvar(--muted-foreground)Text/icon colour for list tabs variant
--tabs-list-radiusvar(--radius-lg)Border radius for list
--tabs-trigger-activevar(--background)Colour for trigger active tabs variant
--tabs-trigger-active-foregroundvar(--foreground)Text/icon colour for trigger active tabs variant
--tabs-trigger-active-bordervar(--input)Border colour for trigger active tabs variant
--tabs-trigger-radiusvar(--radius-md)Border radius for trigger
--shadow-tabs-triggervar(--shadow-sm)Box shadow for tabs trigger