Titles beside a panel. Point at a title, or reach it by keyboard, to show its content.

pnpm dlx shadcn@latest add @latheui/hover-tabsPart of Lathe Pro. Set up your project once with your license key: npx latheui init --key <key>. See Lathe Pro.
Hover Tabs is part of Lathe Pro
The preview is live and free to try. The source, the install and every assembly come with Pro: $79 once, with lifetime updates.
Depends on
Also accepts native div attributes.
| Prop | Type | Default | Description |
|---|---|---|---|
| items* (required) | HoverTabItem[] | — | The tabs, in order. |
| label* (required) | string | — | Accessible name of the list. |
| value | string | — | Controlled active item. |
| defaultValue | string | first item | Active item at first when uncontrolled. |
| onValueChange | (value: string) => void | — | Called when the active item changes. |
| Prop | Type | Default | Description |
|---|---|---|---|
| value* (required) | string | — | Unique among the items. |
| title* (required) | string | — | The tab's text. |
| description | ReactNode | — | A line under the title. |
| image | { src: string; alt: string } | — | Shown in the panel. |
| content | ReactNode | — | Shown in the panel instead of the image. |
const [tab, setTab] = React.useState("speed")
<HoverTabs
label="Performance"
value={tab}
onValueChange={setTab}
items={[
{ value: "speed", title: "Fast", content: <SpeedChart /> },
{ value: "uptime", title: "Reliable", content: <UptimeChart /> },
]}
/>