Skip to main content
Home pageReact NativeComponents

Components

The @latty-ds/react-native package ships 40+ components that mirror the web component library. All components consume the theme from LattyProvider context and adapt to the active color scheme automatically.

Prop conventions​

React Native components follow the same naming patterns as their web counterparts:

PropTypeUsed by
variantColor intent: primary, secondary, success, warning, error, info, neutralButton, Badge, Alert, Chip, Progress, Spinner, Switch, Checkbox, Radio
appearanceVisual weight: filled, outlined, ghost, softButton, Badge, Alert, Chip, Accordion, Surface
sizeDimension: sm, md, lgButton, Textfield, Badge, Chip, Select, etc.
disabledBoolean — disables interactionAll interactive components

Key differences from web​

Events — React Native uses onPress instead of onClick, onValueChange instead of onChange for toggles.No slots — where web components use named slots, RN components use render props or dedicated props (e.g. icon, leading, trailing).Style prop — every component accepts a style prop for layout overrides (ViewStyle).No CSS custom properties — styling is controlled through the theme context, component props, and the style prop.

Component catalog​

Layout​

ComponentDescription
SurfaceThemed container with background, elevation, and border radius
DividerHorizontal or vertical separator line
AppBarTop navigation bar with title, actions, and back button
DrawerSlide-in panel from any edge of the screen

Actions​

ComponentDescription
ButtonPrimary interactive element with variants, sizes, loading state, and icons
IconButtonIcon-only button for toolbar actions
LinkInline text link with underline options
ChipCompact label for tags, filters, or selections

Forms​

ComponentDescription
TextfieldText input with label, helper text, and validation states
SelectSingle-value picker from a list of options
ComboboxSearchable select with autocomplete
CheckboxBoolean toggle with label
SwitchOn/off toggle control
Radio + RadioGroupSingle selection from a group
SliderRange value selector
DatePickerDate selection with calendar popup
CalendarFull month calendar view

Data display​

ComponentDescription
TextTypography component with 15 variants
BadgeStatus indicator or count label
Avatar + AvatarGroupUser photo or initials with stacking
TableData table with sorting and density options
List + ListItem + ListDividerStructured vertical list
LtImageImage with loading state and fallback
SkeletonPlaceholder shimmer for loading states
ProgressDeterminate or indeterminate progress bar
SpinnerLoading indicator

Feedback​

ComponentDescription
AlertInline message with variant coloring and optional close
Snackbar + SnackbarGroupToast notification at the bottom of the screen
DialogModal overlay for confirmations and forms
TooltipContextual hint on long press
ComponentDescription
TabGroup + TabTabbed content switching
PaginationPage navigation controls
DropdownAction menu triggered by a button or long press
Accordion + AccordionGroupCollapsible content panels

Icons​

ComponentDescription
LattyIconIcon renderer using the Latty icon set

Example​

A complete screen using multiple components:

import { ScrollView } from 'react-native';
import {
LattyProvider,
AppBar,
Surface,
Text,
Textfield,
Button,
Badge,
Divider,
Alert,
useLatty,
} from '@latty-ds/react-native';

function ProfileScreen() {
const { theme } = useLatty();

return (
<>
<AppBar title="Profile" />
<ScrollView
style={{ flex: 1, backgroundColor: theme.semantic.bg.base }}
contentContainerStyle={{ padding: theme.layout.screenPadding, gap: theme.spacing['4'] }}
>
<Alert variant="info">Complete your profile to unlock all features.</Alert>

<Surface elevation={1} appearance="outlined" style={{ gap: 16, padding: 16 }}>
<Text variant="h4">Personal info</Text>
<Textfield label="Full name" size="md" />
<Textfield label="Email" size="md" />
<Divider />
<Button variant="primary">Save changes</Button>
</Surface>

<Badge variant="success" appearance="soft">Profile 80% complete</Badge>
</ScrollView>
</>
);
}

export default function App() {
return (
<LattyProvider config={{ colors: { primary: '#4F46E5' } }}>
<ProfileScreen />
</LattyProvider>
);
}

TypeScript​

All component props, theme types, and utilities are exported:

import type {
LattyTheme,
LattyProviderProps,
SemanticTokens,
ColorScheme,
ColorPalette,
ButtonProps,
ButtonVariant,
TextProps,
TextVariant,
TextColor,
SurfaceProps,
BadgeProps,
AlertProps,
NativeShadow,
} from '@latty-ds/react-native';