This documentation is available as Markdown for AI agents and LLMs. See the full Markdown index or append .md to any documentation URL.
List
A SwiftUI List component for displaying scrollable lists of items.
Expo UI List matches the official SwiftUI List API and supports styling via the listStyle modifier, various row/section modifiers, as well as selection, reordering, and editing capabilities.
Installation
If you are installing this in an existing React Native app, make sure to install expo in your project.
Usage
Basic list
List with labels and icons
List styles
Use the listStyle modifier to change the list's appearance.
Note: The
inset,insetGrouped, andsidebarstyles are not available on tvOS.
Selection and edit mode
Enable selection, deletion, and reordering of list items using the List.ForEach compound component with onDelete and onMove props.
- Use the
environmentmodifier to enable edit mode - Use the
tagmodifier to identify items - Use the
selectionprop to control selected items - Use
moveDisabledanddeleteDisabledmodifiers to disable these actions on individual items
Pull to refresh
Use the refreshable modifier to enable pull-to-refresh functionality.
Row styling
Use listRowBackground, listRowSeparator, and listRowInsets modifiers to customize individual rows.
Keyboard dismiss behavior
Use the scrollDismissesKeyboard modifier to control how the keyboard is dismissed when scrolling.
Header prominence
Use the headerProminence modifier to adjust the visual prominence of section headers.
API
import { List } from '@expo/ui/swift-ui';
Components
Type: React.Element<ListProps>
A list component that renders its children using a native SwiftUI List.
Type: React.Element<ListForEachProps>
A compound component of List that enables item deletion and reordering.
This component must be used as a child of List (as List.ForEach).
(indices: number[]) => voidCallback triggered when items are deleted. Receives an array of indices that were deleted.
See: Official SwiftUI documentation.
(sourceIndices: number[], destination: number) => voidCallback triggered when items are moved. Receives the source indices and destination index.
See: Official SwiftUI documentation.