SwipeUI

List section

A labelled group of independently accessible rows.

npx @swipeui/cli add list-section
Variant
Preset
Material
Scheme
Feel
Real free component with a browser animation bridge. Native motion, haptics and materials need a device.

When to use it

  • Grouping related rows in settings, such as Account, Notifications and Privacy.
  • Inset grouped lists like iOS Settings, or plain full-width sections.
  • Adding a short explanation below a group of rows.

When not to use it

  • Collapsible groups. Use Accordion.
  • A single row.
  • Grids or cards.

Installation

Run this from your app's root. If SwipeUI isn't set up yet, run npx @swipeui/cli init first; it sets up Uniwind, the theme tokens and the cn helper.

npx @swipeui/cli add list-section
  • Adds components/swipeui/ui/list-section.tsx and 4 shared helpers.
  • Installs react-native-reanimated, react-native-worklets, uniwind, clsx, tailwind-merge, class-variance-authority. In Expo apps it uses npx expo install so versions match your SDK.

Usage

app/settings.tsx
import { ListSection } from '@/components/swipeui/ui/list-section';

<ListSection title="Account" footer="Changes sync to your account.">
  <ListRow title="Profile" onPress={openProfile} />
</ListSection>;

API reference

PropTypeDefaultDescription
animateEntrance?booleanfalse

Fade newly added rows in.

animateLayout?booleanfalse

Animate group resizing and row reflow.

motion?MotionOverride—

Shared list motion character.

title?string—

Section heading.

childrenReactNode—

Rows; each row keeps its own accessibility target.

footer?string—

Supporting text below the group.

variant?"inset" | "plain"'inset'

Surface treatment.

surface?"filled" | "plain" | "raised"'raised' for inset, 'plain' for plain

Explicit surface; overrides variant.

separators?booleantrue

Draw quiet inset separators between children.

separatorInset?number16

Separator inset from each logical edge, in points.

headerAction?ReactNode—

Optional independent action beside the section heading.

className?string—

Root classes.

style?StyleProp<ViewStyle>—

Root layout escape hatch.

testID?string—

Root identifier.

Composition and behavior

  • title heads the group; children are the rows; footer adds supporting text.
  • variant is inset (rounded card) or plain.

Behavior and gestures

  • Static; the rows inside handle their own taps.

Accessibility

  • The title is a header, so screen reader users can jump between sections.
  • Each row keeps its own focus stop.
  • Footer text wraps fully at large sizes.

Motion

  • Uses the list motion role, so it follows your app's feel. Pass motion to tune this one instance.
  • Independent optional entry and layout transitions respect reduced motion.

Performance

  • A simple container.

Notes for AI

  • Put List rows inside; use footer for short explanations.

Compatibility

Runs onSupported
Expo SDK 57Yes
Expo SDK 58Yes
React Native CLI (with Expo modules)Yes
Expo GoYes
iOSYes
AndroidYes

This table describes API support and static bundle checks. Native runtime, device accessibility and bare Uniwind compatibility remain pending.

Related items