Skip to Content
ComponentsData Display

Data Display Components

Components for presenting content, information, and structured data. All components use semantic theme tokens and support light/dark modes.

import { Text, Avatar, Badge, Card, Chip, ListItem } from '@/common/components';

Text

The foundational typography component with 8 variants, semantic colors, and weight control. Extends React Native’s TextProps.

Variants

<Text variant="h1">Heading 1</Text> <Text variant="h2">Heading 2</Text> <Text variant="h3">Heading 3</Text> <Text variant="body">Body text -- the default variant</Text> <Text variant="bodySmall">Smaller body text</Text> <Text variant="caption">Caption text</Text> <Text variant="label">Label text</Text> <Text variant="overline">OVERLINE TEXT</Text>

Colors and Weight

<Text color="primary">Primary text color</Text> <Text color="secondary">Secondary, less emphasis</Text> <Text color="accent">Accent / teal color</Text> <Text color="link">Link-styled text</Text> <Text weight="bold">Bold weight</Text> <Text weight="semibold">Semibold weight</Text> <Text variant="body" weight="medium" color="secondary">Combined styling</Text>

Alignment and Truncation

<Text align="center">Centered text</Text> <Text numberOfLines={2}> This long text will be truncated after two lines with an ellipsis... </Text>

Props

PropTypeDefaultDescription
childrenReactNoderequiredContent to render
variant'h1' | 'h2' | 'h3' | 'body' | 'bodySmall' | 'caption' | 'label' | 'overline''body'Typography variant controlling size and line height
weight'regular' | 'medium' | 'semibold' | 'bold'Font weight override
color'primary' | 'secondary' | 'tertiary' | 'muted' | 'inverse' | 'accent' | 'link'Semantic text color token
align'left' | 'center' | 'right'Horizontal text alignment

Text extends React Native’s TextProps, so you can use numberOfLines, ellipsizeMode, selectable, and all other standard text props.

Also documented under Typography with the full type scale reference.


Avatar

Displays a user or entity representation with three fallback layers: image, initials, and icon.

Image Avatar

<Avatar source={{ uri: 'https://example.com/photo.jpg' }} size="lg" />

Initials Fallback

When no source is provided, the component renders initials on a colored background.

<Avatar initials="JD" size="md" />

Icon Fallback

When neither source nor initials is provided, a custom icon is rendered.

import { Icon } from '@/common/components'; <Avatar icon={<Icon name="person-outline" size={20} />} size="md" />

Sizes

SizePixel Dimension (approx.)
xs24px
sm32px
md40px (default)
lg56px
xl80px

Props

PropTypeDefaultDescription
sourceImageSourceImage source (takes priority over initials and icon)
initialsstringOne or two character string for initials fallback
iconReactNodeCustom icon node as final fallback
size'xs' | 'sm' | 'md' | 'lg' | 'xl''md'Avatar size
accessibilityLabelstringScreen reader label

Fallback priority: source (image) > initials (text) > icon (custom node) > default person icon.


Badge

A compact status indicator with three visual variants and five color schemes. Can wrap a child element in dot mode.

Count Badge

<Badge count={5} /> <Badge count={150} maxCount={99} /> {/* Displays "99+" */} <Badge count={3} variant="outline" colorScheme="success" />

Dot Badge

Wraps a child element with a small notification dot.

<Badge variant="dot" colorScheme="error"> <Icon name="notifications-outline" size={24} /> </Badge>

Color Schemes

<Badge count={1} colorScheme="primary" /> <Badge count={2} colorScheme="success" /> <Badge count={3} colorScheme="warning" /> <Badge count={4} colorScheme="error" /> <Badge count={5} colorScheme="info" />

Props

PropTypeDefaultDescription
variant'solid' | 'outline' | 'dot''solid'Visual style variant
size'sm' | 'md''md'Badge size
colorScheme'primary' | 'success' | 'error' | 'warning' | 'info''primary'Color scheme
countnumberNumeric value to display
maxCountnumber99Maximum displayed count before showing {max}+
childrenReactNodeChild element wrapped by the badge (used with dot variant)

Card

A content container with three visual variants. Supports press interactions with animated feedback.

Variants

<Card> <Text>Default filled card</Text> </Card> <Card variant="elevated"> <Text>Elevated card with shadow</Text> </Card> <Card variant="outlined"> <Text>Outlined card with border</Text> </Card>

Pressable Card

<Card pressable onPress={handleCardPress}> <Text variant="h3">Tap Me</Text> <Text color="secondary">This card responds to press with animation</Text> </Card>

Props

PropTypeDefaultDescription
variant'filled' | 'elevated' | 'outlined''filled'Visual style variant
pressablebooleanfalseEnable press interactions
onPress() => voidPress handler (only effective when pressable is true)
childrenReactNoderequiredContent rendered inside the card

Card extends React Native’s ViewProps, so you can pass style, testID, and other standard view props.


Chip

A compact, selectable tag component with optional close button. Useful for filters, tags, and multi-select inputs.

Basic Usage

<Chip label="React Native" onPress={handleToggle} /> <Chip label="TypeScript" variant="solid" selected />

With Icon and Close

import { Icon } from '@/common/components'; <Chip label="Location" icon={<Icon name="location-outline" size={14} />} selected onClose={handleRemove} />

Sizes

<Chip label="Small" size="sm" /> <Chip label="Medium" size="md" />

Props

PropTypeDefaultDescription
labelstringrequiredText content displayed inside the chip
variant'solid' | 'outline''outline'Visual style variant
size'sm' | 'md''md'Chip size
selectedbooleanfalseWhether the chip is in a selected state
onPress() => voidPress handler for toggling
onClose() => voidClose handler (renders a close icon when provided)
iconReactNodeOptional icon rendered before the label
disabledbooleanfalseDisable the chip

ListItem

A structured list row with title, optional subtitle, and left/right content slots. Supports press interactions with animated feedback.

Basic Usage

<ListItem title="Profile" onPress={handleNavigate} /> <ListItem title="John Doe" subtitle="john@example.com" onPress={handleSelect} />

With Slots

import { Avatar, Icon, Switch } from '@/common/components'; <ListItem title="Account" subtitle="Manage your account settings" left={<Avatar initials="JD" size="sm" />} right={<Icon name="chevron-forward" variant="muted" />} onPress={handleNavigate} /> <ListItem title="Dark Mode" right={<Switch value={isDark} onValueChange={toggleDark} />} />

With Divider

<ListItem title="First Item" divider /> <ListItem title="Second Item" divider /> <ListItem title="Last Item" />

Props

PropTypeDefaultDescription
titlestringrequiredPrimary text
subtitlestringSecondary text below the title
leftReactNodeContent rendered on the left (e.g., avatar, icon)
rightReactNodeContent rendered on the right (e.g., badge, switch, chevron)
onPress() => voidPress handler (makes the item pressable when provided)
dividerbooleanfalseRender a divider below the item
disabledbooleanfalseDisable the list item
size'sm' | 'md' | 'lg''md'Size variant controlling dimensions
Last updated on