videorc/ui

Navigable Row

A fact row of icon, label and value. When the value's home is another page, the row becomes a button with a chevron that jumps there, and a hint lists the facts a short value stands for.

Session
Dropped frames0

Choose a row to open its page.

Installation

$ pnpm dlx shadcn@latest add @videorc/navigable-row

Usage

import {
  NavigableRow,
  NavigableRowHintLines,
} from "@/components/navigable-row";
<GroupedList label="Session">
  <NavigableRow
    icon={CameraIcon}
    label="Camera"
    onNavigate={() => openPage("sources")}
    value="FaceTime HD Camera"
  />
</GroupedList>

Use it for a fact another page owns: the Studio's Session rows, a Settings row that points at Output or Livestream. Pass onNavigate only when the value lives somewhere else, and send it to the one page that owns it.

Don't use it for a row that changes something in place: that's a List Row with a control, or a Settings row.

A long text value gives way first: the label keeps its width and the value truncates ("Microphone" beside "Microphone (HD Pro Webcam C920)", never "Mic…"). A control value, such as a Stop button, keeps its width instead, and the label truncates.

When a value sums up several facts ("1080p · 60 fps", "2 on"), hint shows them on hover and on focus. NavigableRowHintLines puts one fact on each line. Only a row that navigates takes a hint, since only a button takes focus.

Theming

Token or attributeMeaning
h-row, px-3The 32 px row with 12 px padding
rounded-row8 px on a row alone; none inside a GroupedList
text-muted-foregroundThe icon, the label and the chevron
text-foregroundThe value, at weight 500
hover:bg-accentThe hover of a row that navigates
data-slotnavigable-row on the row, navigable-row-label and navigable-row-value on its parts, navigable-row-hint on a hint's lines

Keyboard

KeyAction
TabMoves to a row that navigates and shows its hint
Enter, SpaceOpens the value's page

Accessibility

A row that navigates is a button named by its label and value; the chevron is decorative. Its hint is a Tooltip, never a native title. A fact row is plain text.

API reference

Prop

Type

Prop

Type