Navigation Row
A row of a list that opens what it holds, as an iOS Settings row: its label, the current value at the end, a chevron, and the whole row one press.
import { NavigationRow } from "@plexui/vue/components/NavigationRow";A navigation row leads into what it holds, as a row of iOS Settings does: General › Language shows the language in use and opens the list to change it. Use it for a setting whose choices or details need a page of their own; for a choice made in place, use a Select in a Field row, and for a row that does something at once, an action row (a ghost Button with block in a data-row).
Examples
Overview
Leading
Columns
API
NavigationRow
| Prop | Type | Default | Description |
|---|---|---|---|
label | string | number | — | The name of the row, where a row's label starts (or the `label` slot) |
value | string | number | null | — | The current value, at the end of the row in the secondary label color (or the `value` slot). `0` shows; `null`, `undefined` and `""` do not |
description | string | number | — | A line under the label; the row grows from 52px to hold it (or the `description` slot, where a `<br />` starts a second line) |
to | string | object | — | A router target: with it the row is a link, through the `linkComponent` of `PlexUIProvider` |
href | string | — | Where the row goes, as a plain link |
as | Component | "a" | — | The link component, such as a router's link |
external | boolean | — | Treats the link as one out of the app (a new tab) |
disabled | boolean | false | The row can't be pressed. A disabled link renders as a disabled button, so it never navigates |
disclosure | boolean | true | The chevron at the end. `false` drops it, for a row that opens a record rather than a page of choices (the Contacts list of iOS); the row is still one press |
valuePlacement | "end" | "below" | "auto" | "end" | Where the value stands: at the end of the row, under the label at the full width, or `auto`: at the end while it fits beside the label on one line, otherwise under it |
Slots: label, value, description, in place of their props; leading, what leads the row (an Avatar or a picture) in a column before the label, on the label's first line (a taller avatar starts at its top), the line above the row starting after it.
Events: click, when the row is pressed.
Exposed: element, the pressable (the button, or the element of the link), and focus().
Every other attribute (an id, a class, listeners, ARIA and data attributes) goes to the pressable. The row says nothing of what it opens: a row that opens a dialog in place of a page sets aria-haspopup="dialog" and aria-expanded itself. The name the row reads with is its label, description and value in that order.
Styling
NavigationRow reads the row tokens of FieldGroup (--field-row-min-height, --field-row-padding-inline, --field-row-label-*, --field-row-description-*, --field-row-gap, --field-row-disclosure-gap) and five of its own. Override them at any scope to restyle it:
--navigation-row-label-color: the label (default the text color)--navigation-row-value-color: the value (default the secondary label color; the text color withcolumns)--navigation-row-disclosure-color: the chevron (default the tertiary label color)--navigation-row-leading-size: the column ofleading, its own size (default40px, an avatar;28pxfor a symbol)--navigation-row-leading-gap: fromleadingto the text (default12px)