Launch prototype

Components

Tabs

React Aria Tabs, composed with Badge - 4 shared button types plus an orientation-specific underline/line type, two sizes, optional icon and count badge - driven from config/design-system.config.ts.

Component Playground

Live instance - the controls read their options from the same config that drives the Types section below.

A summary of everything happening in this workspace.

Controls

Orientation

Type

Size

Types

4 types work in either orientation - button-brand, button-gray, button-border, button-minimal. underline is horizontal-only, line is its vertical equivalent.

Horizontal

Button brand / Button gray / Button border / Button minimal / Underline

button-brand
button-gray
button-border
button-minimal
underline

Vertical

Button brand / Button gray / Button border / Button minimal / Line

button-brand
button-gray
button-border
button-minimal
line

Sizes

Two sizes - sm (default) and md.

Small / Medium

Full width

Pass fullWidth on Tabs.List to stretch tabs across the available width - common for the underline type on a page-level tab bar.

Full width, underline

API

Tabs holds selection state; Tabs.List (alias TabList) renders the clickable row/column of Tabs.Items (alias Tab); each has a matching Tabs.Panel (alias TabPanel) with the same id.

Tabs

PropTypeDefault
orientation"horizontal" | "vertical""horizontal"
keyboardActivation"automatic" | "manual""manual"
classNamestring-
childrenReactNode-

Tabs.List

PropTypeDefault
size"sm" | "md""sm"
typeHorizontalTypes | VerticalTypes (see Types below)"button-brand"
orientation"horizontal" | "vertical"inherited from Tabs
fullWidthbooleanfalse
itemsT[]-
classNamestring-

Tabs.Item

PropTypeDefault
idKey-
labelReactNode-
iconFC<{ className?: string }> | ReactNode-
badgenumber | string-
isDisabledbooleanfalse
childrenReactNode | ((props: TabRenderProps) => ReactNode)-

Tabs.Panel

PropTypeDefault
idKey-
childrenReactNode-

Usage

import { Tabs } from "@/components/application/tabs/tabs";
import { Users01 } from "@untitledui/icons";

<Tabs orientation="horizontal">
  <Tabs.List type="button-brand" size="sm">
    <Tabs.Item id="overview" label="Overview" />
    <Tabs.Item id="team" label="Team" icon={Users01} badge={8} />
    <Tabs.Item id="settings" label="Settings" />
  </Tabs.List>

  <Tabs.Panel id="overview">Overview content</Tabs.Panel>
  <Tabs.Panel id="team">Team content</Tabs.Panel>
  <Tabs.Panel id="settings">Settings content</Tabs.Panel>
</Tabs>

Figma

No linked Figma file yet - this component was pulled in via the Untitled UI CLI, not designed in Figma first.