Expo & React Native
Touch-first semantic tokens and native components for Expo and React Native apps.
fort-ui automatically detects Expo and React Native projects via package.json and installs native components built with React Native StyleSheet, Pressable, and useColorScheme().
Setup in Expo
1. Initialize fort-ui
From your Expo project root:
npx fort-ui initThis detects "platform": "native", writes fort-ui.json, and copies semantic light/dark tokens into lib/fort-tokens.ts.
2. Add Native Components
npx fort-ui add button switch grouped-listTo inspect all available native components:
npx fort-ui list --platform nativeAvailable Native Components
- Tokens (
lib/fort-tokens.ts):fortTokensanduseFortTheme()matching Web CSS variables (bg,surface,surfaceMuted,separator,tint,destructive,hairline). - Button (
components/ui/button.tsx):Pressable-based button withfilled,tinted,gray,plain,destructive, anddestructive-tintedvariants plus press scale feedback. - Badge (
components/ui/badge.tsx): Pill and rounded status/counter badges. - Switch (
components/ui/switch.tsx): NativeSwitchpre-wired with fort-ui track colors. - Input (
components/ui/input.tsx): Soft-filledTextInputwith focus tint border. - Card (
components/ui/card.tsx): Grouped surface container withStyleSheet.hairlineWidthborders. - GroupedList (
components/ui/grouped-list.tsx): Inset settings container with hairline row dividers and pressable items. - SegmentedControl (
components/ui/segmented-control.tsx): Animated sliding pill segmented tab switcher. - Checkbox (
components/ui/checkbox.tsx): Circular touch-first checkbox with indeterminate support andhitSlop. - Progress & Spinner (
components/ui/progress.tsx): Animated progress bar and nativeActivityIndicatorspinner. - Avatar (
components/ui/avatar.tsx): Circular avatar container withAvatarImageand automaticAvatarFallback. - AlertDialog (
components/ui/alert-dialog.tsx): Centered confirmation modal with stacked or split hairline action dividers. - ActionSheet (
components/ui/action-sheet.tsx): Stacked bottom modal action sheet with separated cancel card. - Sheet (
components/ui/sheet.tsx): Swipe-to-dismiss bottom modal sheet usingPanResponder. - TabBar (
components/ui/tab-bar.tsx): Docked or floating bottom navigation bar with badge counters.