tapcn
Components

List Item

A mobile-style list row with leading, trailing, and separator support.

Settings
ProfileManage your profile information
NotificationsManage notification preferences
Preferences

List Item

A mobile-style list row component for building settings screens, menus, and navigation lists. Supports leading and trailing content, subtitles, chevron indicators, and optional separators. Use ListItemGroup to organize items under section headings.

Installation

npx @tapcn/cli add list-item

Or using shadcn directly:

npx shadcn@latest add https://tapcn.vercel.app/r/list-item.json

Usage

import { ListItem, ListItemGroup } from '~/components/ui/list-item';
import { Icon } from '~/components/ui/icon';
import { Bell, User, Shield } from 'lucide-react-native';

export function ListItemExample() {
  return (
    <ListItemGroup title="Settings">
      <ListItem
        title="Profile"
        subtitle="Manage your account"
        leading={<Icon as={User} className="size-5 text-foreground" />}
        chevron
        onPress={() => {}}
      />
      <ListItem
        title="Notifications"
        leading={<Icon as={Bell} className="size-5 text-foreground" />}
        chevron
        onPress={() => {}}
      />
      <ListItem
        title="Privacy"
        leading={<Icon as={Shield} className="size-5 text-foreground" />}
        chevron
        showSeparator={false}
        onPress={() => {}}
      />
    </ListItemGroup>
  );
}

ListItem Props

PropTypeDefaultDescription
titlestring-Primary text for the list row.
subtitlestring-Secondary text displayed below the title.
leadingReact.ReactNode-Content rendered on the left side (e.g., an icon).
trailingReact.ReactNode-Content rendered on the right side. Overrides chevron when provided.
onPress() => void-Callback fired when the row is pressed.
showSeparatorbooleantrueWhether to show a bottom separator line.
chevronboolean-When true, displays a right-pointing chevron icon on the trailing side.
disabledboolean-When true, the row is not pressable and appears dimmed.
classNamestring-Additional CSS classes for the pressable container.

ListItemGroup Props

PropTypeDefaultDescription
titlestring-Section heading displayed above the group.
classNamestring-Additional CSS classes for the group container.
childrenReact.ReactNode-The list items to render inside the group.

Dependencies

  • lucide-react-native

On this page