Grouped List
GroupedList is the body of a settings screen: it fills the region, scrolls, and holds groups of rows.
<GroupedList> <RowGroup label="Display"> <Row render={<label />} trailing={<Switch />}>Increase contrast</Row> </RowGroup></GroupedList>Use a GroupedList when a screen is groups of rows, such as settings. Put it where the region's scroll area goes: after the toolbar in a dialog, sheet or popover, and in place of ShellScroll in a Shell pane. It is that scroll area, so the toolbars float over it as usual.
Inside it, each RowGroup's box is a shade off the region, so the groups read without borders. Every control goes in a row: a switch, a select, a text field. A screen is groups of rows or loose fields, never both.
Props
Generated from the types. It lists what this component DECLARES: a prop that arrives from a shared type or from the platform is real and is not repeated here.
| Prop | Type | What it does |
|---|---|---|
aria-label? | string | The accessible name of the list, when nothing on screen names it. |
aria-labelledby? | string | The id of an element that names the list, usually the region's title. |
children? | React.ReactNode | The groups, usually RowGroups, and a title above them if the region has one. |
className? | string | Your classes, appended to the ones this component resolves rather than replacing them. |
fade? | boolean | Fades the content at each edge that has more content beyond it. |
style? | React.CSSProperties | Inline styles, merged last, so your value wins over anything the component resolved. |