Menu row
The single row used inside every popover menu — workspace switcher, device pickers, system-audio picker, on-screen options, future editor menus. The shape covers ~95% of the recurring menu-row needs without bespoke CSS per menu.
Kinds
MenuRowKind | Story |
|---|---|
Default | (see other rows) |
Selected | menu-row-selected |
Action | menu-row-action |
Danger | menu-row-action (second row) |
Disabled | bottom of popover-with-footer |
Slots
leading—Option<Children>. Typically anIconTile(device / app / workspace flavor).title— requiredString. Truncates withtext-overflow: ellipsiswhen the row narrows.subtitle— optionalString. Same truncation behavior.badges—Vec<MenuBadgeView>. Each(label, BadgeKind)pair renders inline between the text and trailing slot.trailing—Option<Children>. Typically aKbdshortcut chip or a chevron glyph.
MenuRowKind::Selected also emits a ✓ after the trailing slot —
saves callers from having to thread a check into the trailing prop.
The other kinds don't auto-inject anything.
Composition example
flowchart LR
Popover[PopoverSurface] --> Header[header: title + description]
Popover --> Body[body]
Body --> List[MenuList]
List --> Section[MenuSection]
Section --> Row[MenuRow]
Row --> Leading[leading: IconTile]
Row --> Text[title + subtitle]
Row --> Badges[badges]
Row --> Trailing[trailing: Kbd]
Popover --> Footer[footer: MenuFooter]
Long-label behavior
Titles + subtitles truncate at the row's max-width. The badges +
trailing slot stay visible at full size; only the text column shrinks.
This is why the row uses flex: 1 on the text column and
flex-shrink: 0 on the badge / trailing columns.