compacto-ui

Search documentation

Jump to a page or a component.

Tabs

Filled segmented track, or a bare line with a rule marker.

Preview

Filled variant.
Line variant.
Nav variant — a settings dialog’s section rail.

Installation

No install — ask an AI agent to copy this component from registry.json.

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

Notes

  • The active marker follows orientation: an underline horizontally, a right-hand rule vertically.
  • variant="line" drops the filled track and marks the active tab with a rule, which reads better when the tabs sit directly on a panel edge.
  • variant="nav" is a fixed-width icon rail meant for orientation="vertical" — a settings dialog's left-hand section list, each row an icon plus an uppercase label.

Props

The props worth knowing. Everything else passes straight through to the underlying element, including className, which is merged last so it always wins.

PropTypeDefaultDescription
orientation (Tabs)"horizontal" | "vertical""horizontal"List direction.
variant (TabsList)"default" | "line" | "nav""default"Filled segmented track, a bare row, or a bordered icon rail.