Data
List row
A row in a sidebar or a list: an icon, a name, a count, and the current page marked.
Data
A row in a sidebar or a list: an icon, a name, a count, and the current page marked.
Change the props on the right. The row and its code follow.
import { ListRow, ListRowMeta } from 'omuk-ui/list-row';
import { FileTextIcon } from 'lucide-react';
<ListRow current>
<FileTextIcon strokeWidth={1.5} aria-hidden />
Release notes
<ListRowMeta>2 min</ListRowMeta>
</ListRow>An icon, a name and a count. The current row takes the selected tint at medium weight, and its icon the text colour. ListRowMeta puts small muted text at the row’s end.
render draws the row as a link. level steps the content in by 16 for each level, while the fill keeps the row’s full width.
useSelection (omuk-ui/selection) turns the rows into a listbox of many: listProps(name) on the list, optionProps(id) on each row. A click picks one row, Shift + click a range, Ctrl or Cmd + click one more. Space adds or removes the focused row, and Shift with an arrow key grows the range.
0 selected
ListRow takes every prop of a <button>; ListRowMeta every prop of a <span>.