Components · Data Display
ListRow
The row for the people and agents on a detail page, settings and shortcuts — a leading block, a title and a preview, the time and a badge.
import { ListRow } from "@botiverse/raft-ui";A ListRow is one row of a list: a person, an agent, a setting or a shortcut into another page. The whole row is the target. Use it for the agents and people on a detail or profile page, and for settings. Raft Chat's phone lists of places (Home, Members, the Settings list) use the sidebar row instead (Choosing a component).
When to use
Anatomy
ListRow: the row. Abuttonby default; render a link for a row that goes somewhere.- Leading block: an Avatar, a channel tile (IconTile) or a 20px
ListRowIcon(18px on anactionrow: An action's risk). Optional. ListRowBody: the text column. Required.ListRowTop:ListRowTitle, then the time inListRowMeta.ListRowSubtitle: data about the row's subject, under the title: an agent's description, a person's role, a channel's topic, an app's byline. Optional.ListRowBottom: the preview inListRowDescription, then at most one badge.
- Trailing: a setting's
ListRowValueandListRowChevron, or a Switch. Optional. ListRowGroup: an inset group that wraps rows in a card. Optional. A section can hold more than one (More than one group in a section).ListRowSkeleton: a row that stands in for aListRowwhile the list loads (Loading). Optional; experimental, from@botiverse/raft-ui/wip.
In a plain row, both ends center on the whole row, with or without a description: the leading icon, avatar or tile, and the trailing value, chevron, switch, checkbox, radio or button. A setting reads as one unit, and its controls belong to the whole row, not to the title. Each keeps its size, and the row is its padding and its tallest part: 54px on a phone with a switch and a title alone (Alignment).
A setting that applies at once ends its ListRowBody with a SaveStatus line, which takes no room until a change fails: the row is as tall as without it, and its ends center on the whole row. When a change fails, the error appears 4px under the description, the row grows by that line, and the ends, still centered on the whole row, move down by half of it.
Variants
A row that belongs to the setting above
What a setting opens, such as quiet hours' start and end times or a server's channels that have their own notification level, is a row of its own right under the setting, in the same group. Pass it attached: it draws no hairline above it and, as a plain row, has no top padding, so the only space between the two is the setting's own 12px bottom inset. A hairline says "another setting", so between a setting and what belongs to it, it would split one thing in two (cindyz, 2026-11-10, #proj-raft-ui:4ae1a74e). The setting's row keeps its height, and its switch stays centered on its own title and description. The row after the attached one is the next setting and draws its hairline as usual. A setting can open several attached rows, such as one row per channel with its own level: none of them draws a hairline, so they read as one list under the setting.
An attached row that is itself a target, a row with a chevron or one that opens a menu, keeps the control height as its least: 44px on a phone and a touch screen, where it would be 36px without its top padding, and 34px with a mouse on a desktop, which it already is (Hit targets). Its text then sits a few pixels lower by touch; only the hairline is gone.
A display-only attached row right under a row that is a target, such as the pinned announcement that opens it with Remove and Replace under it, keeps its hairline and, as a plain row, its top inset. Drop them there and the target's hover and press fill ends on an edge you cannot see, right against the attached row's own controls (stdrc, 2026-11-12, #proj-raft-ui:95c3f384). The line gives the fill its edge and the inset keeps the controls off it; ListRow does this by itself from the row above (data-interactive), when the two are sibling rows; rows wrapped one by one in li aren't matched (a selector reaching into the previous li would need :has() on an ancestor, which the package does not use), so keep such a pair as siblings. Attached rows that are targets themselves, such as a level's per-channel rows, stay tight: each is a row with a fill of its own, so the fills meet as in any list. Draw the whole group as one target instead, with one hover, only when what is attached is part of the same target, such as the members card's faces, which open the same list: never when it holds actions of its own.
Without the hairline, only sight ties the attached row to its setting, so tie them for assistive technology too, with the setting's title as the name (Accessibility):
- A display-only attached row (
interactive={false}) whose controls are its targets, such as the start and end times, takesrole="group"andaria-labelledbythe setting's title id. A screen reader moving into it announces the setting, "Quiet hours, group", before "Start time", and the controls keep their own short labels. This is afieldsetand itslegend, without the drawing. - An interactive attached row is a button or a link, so it can't be a group: give it
aria-describedbythe setting's title id.
More than one group in a section
A section of settings can hold more than one ListRowGroup, split by topic: in Appearance, the message font size and its preview are one group, and the switches for what the app shows are another. Put the groups under the section's one heading in a column 12px apart (stack-y-3), as far apart as the heading is from the first group, with no hairline joining them. A ListRowGroup sets no space around itself, so the column sets it (cindyz, 2026-11-10, #proj-raft-ui:4ae1a74e).
States
tone says what the place is to the person, or what an action risks (An action's risk). The shared states are in States.
An action's risk
A row can be an action rather than a place: the actions at the end of a details page or panel, such as Archive channel, Leave channel and Delete channel at the end of a channel's details. These are the page's danger zone (Forms). Only an action that cannot be undone takes a color: tone="danger", the title and the leading icon in danger-strong, red (Delete channel, Delete server, Archive agent). Every other action, including those that interrupt but can be undone (Archive channel, Leave channel, Stop agent, Restart / Reset), is in ink, as a place's row is.
-
A color warns only while it is rare. Archive, Leave and Stop all agents in orange made a channel's actions three brown rows out of four: none stood out, and orange beside ink in one card read as a mix-up, not a ranking (cindyz, 2026-11-19, #triage:f2e107f7). Red on the one action that can't be taken back is the warning people need before the click; the others warn in their confirmation, whose button stays orange (Confirming). System settings do the same: on iOS and macOS only a destructive action is red.
-
tone="warning"(warning-strong, orange) is still in the API, and still meets the contrast below, but a danger zone doesn't use it. -
Pass
actionon every row of the danger zone, colored or not. Its leadingListRowIconis 18px, not a list row's 20px. A row that does one thing is a button with a label atlg(Sizes), and it takes that button's icon: at 20px, Leave channel's icon was the largest thing beside any label on the page, a size up from the 16px of the sidebar and the 18px of every large button (cindyz/Jasper, 2026-11-16, #triage:925e747a). It stays 18px when the row is disabled, so nothing shifts. A risk tone impliesaction, but the size belongs to being an action, not to the color: when the ink actions lost their orange, Stop agent and Restart / Reset went back to 20px above an 18px Archive agent in the same card (cindyz, 2026-11-22, #proj-raft-ui:305ded79). -
Only the title and the leading
ListRowIcontake the color. A description, a value, the chevron and the hover and press fills stay as on any row: the color names the risky action, and a red fill or a red explanation would read as an error (Feedback). -
The color is the strong one text can take, never the sticker
warningordanger, which are fills under ink type and 2:1 to 3:1 on paper.warning-stronganddanger-strongkeep at least 4.5:1 on the canvas, a card, a popover and the sidebar, at rest, hovered and pressed, in both modes and every theme (list-row.risk-contrast.test.ts). -
A risk tone needs an interactive row (a
button, or the link you pass withrender). A display-only row (interactive={false}) ignores it: only an action has a risk, and orange or red on a row that does nothing is color without a consequence (Color). A disabled row ignores it too, as it does every tone: everything isforeground-disabled. -
A row is a place or an action, so the two kinds of tone never meet on one row, and
tonetakes either. -
The row still opens its confirmation (Confirming): red warns before the click, and the dialog, with its orange or red button, is where the person commits.
-
Don't color an action in a menu (DropdownMenu). A menu is a short-lived list of choices people scan; a danger zone is a fixed place at the end of a page, set apart from the settings people change often, where the color tells them what each action costs before they reach for it.
Why: slock's channel details panel puts its actions in a card of rows, and colored the titles itself (text-warning-strong and text-danger-strong on the row and text-current on the title and icon), so the color, its contrast and the disabled state were each product's to get right (slock channel details, stdrc/Jasper, 2026-11-10, #proj-raft-ui:dae8db07).
Loading
While the list loads, show ListRowSkeleton rows where the rows will be, in the same ListRowGroup if they have one, and mark the list aria-busy. Each one is a display-only ListRow of the same variant, with a bar in its title, time and description, so it has the loaded row's height and dividers (Feedback). A default row has a 35px leading block and a description; turn them on or off with leading and description to match the rows. Show them only once the wait passes 1 second (Feedback); ListRowSkeleton doesn't delay itself.
Behavior
- Divide rows with
line-hairline. In the default variant the line starts where the text starts; in a settings list it starts at the row's edge (16px); entry rows have no lines between them, because they are a set of buttons, not a list of content. Anattachedrow has no line above it: it belongs to the row above (A row that belongs to the setting above). - The whole row is the target: hover lays the subtle tier,
fill-subtle, over all of it and press the medium tier (Hover and press). While a menu it opened is up (data-popup-open: a context menu, or press and hold on a phone), it laysfill-subtletoo, hovered or not; a selected row keeps its selection. - A list of places or people on a phone (conversations, members, the entries into other pages) passes
cell: each row is a list cell (Lists). It draws no line, and hover (fill-cell-hover), press (fill-cell-press), selection (fill-cell-selected), menu open and keyboard focus are drawn on one rounded shape, as tall as the row and inset 8px at the sides. Put the rows in aflex flex-col gap-0.5 py-2column, so they sit 2px apart and the first and last shapes 8px from the list's ends. A cell's content is padded from its shape, not from the list: 12px inside it at the start and at the end (20px from the list's edges; with a mouse on a desktop 8px inside it, 16px from the edges), so the icon, the avatar, the time and a badge never touch the shape (Lists). A settings row (nocell) keeps its 16px from the card's edges. A column ofcellrows of your own sets[--column-margin:20px]on its root, so its head and toolbar start on the rows' content line on a phone too (Lists). - A settings card (
ListRowGroup,variant="plain") keeps the look above: lines between rows and the row-wide fills. Its rows are a fixed form read as one card, where the line ties each setting to the next; an inset shape inside the card's own border would draw a third edge. - A finger's press shows the press fill the moment it lands, not when the browser marks the row
:active(only after the tap on a touch screen), and clears once the finger moves more than 10px (a scroll or a sheet's swipe) or lifts (Lists). The row does this itself (data-pressing); a mouse is left to:active. When a tap closes the surface the row is in, passpressedfor the moment between the tap and the close, so the tap shows on the row it chose: the message action sheet holds it 75ms. - A row whose only targets are its own controls (a setting with a switch) takes
interactive={false}: it renders a plain element with no hover or press. See States.
Content
- Start a preview with who spoke: "Wug: Release notes are drafted."
- Show at most one badge in a row. An Artifact's news is the exception: one badge per kind of news (Badge).
- Set the time and counts in Space Mono;
ListRowMetadoes this. It stays whole while the title gives way first, then truncates when there is still no room, so a long value in it, such as an email beside a button in a 320px row, is cut instead of running under the button. - Write a setting's consequence in
ListRowDescriptionwithwrap, so it isn't cut off.
Data and explanation
A row's text is data (what the row is there to show) or an explanation you write. Each has its own part, so grey text means the same thing on every row (Color tiers).
- Put data about the row's subject in
ListRowSubtitle: an agent's or a channel's description, a channel's topic, a person's role, an app's byline ("Developer tools · by Linear"). It is primary data, so it is in the title's ink at weight 400 and a size down (text-footnote): size and weight set it apart from the title, and a third difference, colour, would be one too many (Notes on deeper surfaces). It follows a place's tone and the disabled state with the title, and is cut to one line. A risk tone colors the title alone (An action's risk). - Put a time, a date or a gray count in
ListRowMeta: the row's secondary data, at the hint tier in Space Mono. A row has no other grey part for data, so a fact that isn't one of these goes inListRowSubtitle, never in a grey class of your own. - Put a sentence you write to explain a setting in
ListRowDescription: what turning it on does, who can see it, what is lost. Don't put data there: the description is the row's explanation part, held to the same three reasons as a helper text (Writing › Helper text). UnlikeFieldDescription, it takes any content, not aHelperText, since it also holds a conversation's preview. - A conversation's preview stays in
ListRowDescription, inListRowBottomwith its badge: its ink is howtone="unread"marks the row.
Group headings
A group of rows can have a heading above it, such as Channels.
- Write it in sentence case, in
text-footnoteat weight 700 andforeground-hint(Typography). - Add no hint beside or under it that only restates its name: Your preferences, not Your preferences with "Only for you". A hint goes there only when it tells people something the name doesn't, such as a limit ("Up to 30") (Writing).
- Make the heading a button with
aria-expandedwhen the group can collapse, and show the number of rows when it is collapsed. - Put the group's action on the right as an ink text button that underlines on hover (TextLink): Browse.
raft-ui has no exported heading part for these lists yet.
Accessibility
ListRowuses Base UI'suseRenderand renders a nativebutton(or the link you pass withrender), so the row is reached with Tab and activated with Enter or Space. Withinteractive={false}it is adivand only its controls are focusable.- The accessible name is the row's text. Add an accessible name to a badge that is only a number or an icon:
aria-label="3 unread",aria-label="Mentions you". selectedis visual only. Setaria-currentoraria-selectedon the row yourself.- Label a switch in a settings row with the row's title (
aria-labelledby). - Name an
attachedrow by the setting it belongs to, with that setting's title id: a display-only one takesrole="group"andaria-labelledby, an interactive onearia-describedby(A row that belongs to the setting above).ListRowcan't do it for you: only you know which title it belongs to. ListRowIconandListRowChevronare hidden from assistive technology.
Rules
- Don't add an ink border or a shadow to a row or a group: a list is content, and an ink border means a control (Color).
- Don't color a row's text with a class of your own: an action that can't be undone is
tone="danger", which colors the title and the leading icon, keeps their contrast and greys them when the row is disabled (An action's risk).
API
ListRow
Also takes the attributes of its element.
ListRowBody, ListRowBottom, ListRowChevron
Also takes the attributes of its element.
ListRowDescription
Also takes the attributes of its element.
ListRowGroup, ListRowIcon, ListRowMeta, ListRowSubtitle, ListRowTitle, ListRowTop, ListRowValue
Also takes the attributes of its element.
ListRowSkeleton
Also takes the attributes of its element.
Related
Changes
- 0.103.0 · Breaking ChangesExplanation slots take only a
HelperText:FieldDescription,FormSection'sdescription, aChoiceListitem'sdescription,SelectItemDescription,DialogDescription,AlertDialogDescription,DrawerDescription,PopoverDescription,EmptyStateDescription,CardDescription,CardFooter,BannerDescription,DialogFooterNote(work in progress),MessageActionCardHint,MessageActionCardHeaderDescription,MessageActionCardScopeDescriptionandMessageActionCardActionsNote. AHelperTextis made only byhelperText(content, { why, about }):contentis anyReactNode(a string, a formatted message, aTextLinkinside a sentence),whyis"consequence","audience"or"recovery", andaboutnames the thing the line is about. Each slot renders the content withdata-whyanddata-about, and in development warns once when it is given anything else, which it still renders.ToastDescription,NotificationCenterItemBody,EmptyStateTitle,ListRowDescriptionand the status and data parts are unchanged. - 0.102.21 · AddedListRow: an
actionprop (data-action) for a row that is one action, colored or not: its leadingListRowIconis 18px, a labelledlgbutton's icon. A risk tone still implies it. - 0.102.2 · ChangedListRow: an action row's leading icon is 18px. On an interactive row with
tone="warning"ortone="danger"(Leave channel, Archive channel, Delete channel),ListRowIconsizes its svg 18px instead of 20px, also when the row is disabled. - 0.95.1 · ChangedAn attached row under a row that is a target keeps its hairline and top inset ([ListRow › A row that belongs to the setting above](https://raft-design.botiverse.build/components/list-row/#a-row-that-belongs-to-the-setting-above)) ([#1201](https://github.com/botiverse/raft-design/pull/1201)). A display-only
attachedrow (interactive={false}) right under an interactive row now draws the hairline above it and, as aplainrow, keeps its top inset.ListRowdecides this from the row above (it now setsdata-interactive), so callers change nothing. - 0.87.0 · AddedListRow
tone="warning"andtone="danger": an action's risk ([An action's risk](https://raft-design.botiverse.build/components/list-row/#an-actions-risk)). An action row in a danger zone, such as Archive, Leave or Delete at the end of a channel's details, colors its title and its leadingListRowIconwarning-strong(it interrupts but can be undone) ordanger-strong(it cannot be undone), with Button's names and meanings. Nothing else changes: the description, the value, the chevron and the hover and press fills stay as on any row. Only an interactive row takes it (a display-only row ignores it: only an action has a risk), and a disabled row greys everything as for every tone. The row still carriesdata-tone. The newRiskTonetype ("warning" | "danger") is exported besideRowTone;SidebarItemkeepsRowTone. - 0.84.0 · Added
attachedon ListRow: a row that belongs to the setting above it: in aListRowGroup, anattachedrow draws no hairline above it, and aplainone has no top padding, so it follows the row it belongs to with only that row's 12px bottom inset between them. An interactive one (a chevron, a menu) keeps the control height as its least, so it stays a 44px target on a phone and a touch screen (34px with a mouse on a desktop, which it already is). The row carriesdata-attached. Tie it to its setting for assistive technology with the setting's title id: a display-only attached row takesrole="group"andaria-labelledby, an interactive onearia-describedby; ListRow can't know which title it belongs to. The row above keeps its height, and its switch stays centered on its own title and description; the row after draws its hairline as usual. - 0.84.0 · ChangedSaveStatus shows only a failure, and takes no room otherwise: an empty
SaveStatusis hidden (empty:hidden) and has no height, so a setting with it is as tall as one without it. With aSaveStatusErrorin it, the line appears 4px under the control or the description, as before, and the setting grows by it.SaveStatusSavedis deprecated: it renders nothing, whatever its children (no check, no "Saved", no live region).ListRow variant="plain"no longer leaves a SaveStatus line out of what its ends center on: its ends center on the whole row, with an error shown too. - 0.84.0 · Design SystemA section of settings may hold more than one group, split by topic: in Appearance, the message font size and its preview are one
ListRowGroupand the display switches another, 12px apart (stack-y-3) under the section's one header, with no hairline joining them.ListRowGroupis unchanged: it sets no space around itself, and the column of groups sets it.