Esc
Documentation
On this page

Props

PropTypeDefaultDescription
items requiredreadonly TabsItem[]NoneTab definitions
defaultIndexnumber0Initially active tab
variant"default" | "detail""default"Visual style

Example

ts
Tabs({
  items: [
    { label: "Overview", content: Table({ source: overview() }) },
    { label: "Metrics", content: Card({ content: Value({ source: metrics(), field: "cpu" }) }) },
    { label: "Logs", link: "/logs" },
  ],
})

Supporting types

TabsItem
export interface TabsItem {
  label: string;
  content: PageNode | readonly PageNode[];
  link?: string;
}

View the source on GitHub