Tabs

Tabs, TabsList, TabsTrigger and TabsContent in pill, segment or underline styles; the active marker slides to the chosen trigger on a slightly weighty spring, hidden panels stay in the HTML for crawlers, and triggers grow to a 44px hit area on touch screens.

Preview

Tabs preview width

Install

Add it with the shadcn CLI, or copy the source manually.

$ bunx --bun shadcn add @karaui/tabs
@karaui not found? Add it to components.json
{
  "registries": {
    "@karaui": "https://karaui.kamisama-v0.my.id/r/{name}.json"
  }
}

@karaui is in shadcn's public registry directory, so the latest CLI needs no setup. On an older CLI, merge this into the existing file once and every @karaui/… install resolves.

API Reference

Tabs

defaultValue?
string
—
value?
string
—
onValueChange?
((v: string) => void)
—
variant?
"underline" | "pill" | "segment"
pill
className?
string
—

TabsList

className?
string
—

TabsTrigger

value
string
—
className?
string
—
indicatorClassName?
string
—

TabsContent

value
string
—
className?
string
—

Updated