Officina UI
Components

Tabs

Accessible tabbed panels driven by an items array.

Tabs switches between panels from a declarative items array.

Example

Preview
Account overview and recent activity.
import { Tabs } from '@officina/ui';

<Tabs
  items={[
    { label: 'Overview', content: <Overview /> },
    { label: 'Usage', content: <Usage /> },
  ]}
/>;

API

PropTypeDefaultDescription
items*TabItem[]—Tab definitions; each provides a label and panel content.
defaultIndexnumber—Initially selected tab index when uncontrolled.
onChange(index: number) => void—Called with the newly selected index.
selectedIndexnumber—Controlled selected tab index.
variantenumunderlineVisual style of the tab strip.

On this page