Skip to content
View Markdown

List ​

A scrollable collection of rows.

tsx
import { List } from '@satinhq/kit'

Example ​

Full example
tsx
import { LabeledContent, List, Screen, Section } from '@satinhq/kit'

function Example() {
  return (
    <Screen>
      <List id="example">
        <Section>
          <LabeledContent label="Middlemarch" value="George Eliot" />
          <LabeledContent label="Persuasion" value="Jane Austen" />
          <LabeledContent label="The Left Hand of Darkness" value="Ursula K. Le Guin" />
        </Section>
      </List>
    </Screen>
  )
}

Put rows in a Section. Use header and footer for text that describes the group.

Choose a list style ​

The default is insetGrouped. Set listStyle to plain, grouped or sidebar when the list needs a different row layout.

Restore the scroll position ​

Give each list a stable id. Satin uses it to identify that scroll region when you return to a screen.

API ​

Scroll horizontally to read every column.

PropTypeDescription
idstringA stable name for scroll restoration.
listStyleListStyleInset grouped by default.
selectionID | ReadonlySet<ID>List(selection:)
searchableSearchableSearch configuration owned by the list.

Related: Quick start, List, Screen.

:::

Satin runs on the Lumen rendering engine and is open source under the MIT License.