List is a column of ListItem rows with a bullet before each one, or a number when as="ol". React Native has no list markers, so List counts its items and ListItem draws the marker itself, right-aligned in the same 20 step indent the web uses. See the web List page for the web version.
as="ol" numbers the items. start sets the first number.
A ListItem takes Text props, such as variant and onBackground. When its children are only strings and Text, they stay in one line of text. Any other element, like a nested List, goes in a column next to the marker.
- The markers are drawn by ListItem in neutral-on-background-weak, not by the platform. They are hidden from screen readers.
- List and ListItem use role="list" and role="listitem" so screen readers know the structure.
- ListItem only gets its marker inside a List. Outside one, it shows a bullet.
List extends Flex props, so spacing, alignment and the rest apply. It fills the width by default.
ListItem extends Text props, such as variant, onBackground, align and spacing.