UIComponentsReact
Panels of content, one shown at a time, picked by a row of tabs.
Built on the headless Tabs.See its API in Docs
Rendered by React 19.3.1
Installation
npx shadcn@4.23.0 add https://hamur.dev/r/react/tabs.jsonIt also adds utils. The app needs its setup first: Installation.
Usage
Tabs holds TabsList with a TabsTrigger per tab, and a TabsContent per panel; a trigger and its panel share a value, and the root's defaultValue or value picks the one shown. variant="line" on the list draws an underline in place of the filled background, and orientation="vertical" stacks the tabs and turns the arrow keys. The keyboard and the tab roles come from the headless Tabs.
import {
Tabs,
TabsContent,
TabsList,
TabsTrigger,
} from '@/components/ui/tabs'Examples
API reference
The styled parts pass every prop to the headless part they wrap and add classes. The props, data attributes and keyboard are on Tabs's API reference.