React Native & Mobile Examples
Explore complete, copy-pasteable examples for React Native Mobile (iOS & Android), Expo, React Native Paper theme skinning, and Universal Design Tokens.
1. Native Mobile UI
Zero DOM, zero external dependencies. Pure React Native StyleSheet primitives with auto-theming.
2. Paper Theme Adapter
Drop-in Material Design 3 light & dark themes for instant visual upgrades in existing Paper apps.
3. Universal Tokens
Raw JSON and JS design tokens for custom StyleSheet creation across iOS, Android, and Web.
Example 1: Pure React Native Component Suite (`boodoo/react-native`)
Build beautiful iOS & Android screens with tactile cards, buttons, badges, typography, and text inputs. Works seamlessly in both Expo and bare React Native:
Account Settings
iOS & AndroidManage your profile and mobile notification preferences.
import React, { useState } from 'react';
import { SafeAreaView, ScrollView, StyleSheet } from 'react-native';
import {
BoodooProvider,
Card,
Button,
Badge,
Text,
TextInput,
useTheme,
} from 'boodoo/react-native';
function UserProfileScreen() {
const [name, setName] = useState('Alex Morgan');
const [loading, setLoading] = useState(false);
const theme = useTheme();
const handleSave = () => {
setLoading(true);
setTimeout(() => setLoading(false), 1200);
};
return (
<SafeAreaView style={[styles.container, { backgroundColor: theme.colors.background }]}>
<ScrollView contentContainerStyle={styles.content}>
<Card variant="elevated">
<Card.Title
title="Account Settings"
subtitle="Manage your profile & notifications"
/>
<Card.Content>
<Badge variant="primary" style={styles.badge}>iOS & Android</Badge>
<TextInput
label="Display Name"
value={name}
onChangeText={setName}
/>
</Card.Content>
<Card.Actions>
<Button variant="ghost" size="sm" onPress={() => setName('')}>
Reset
</Button>
<Button
variant="primary"
size="sm"
loading={loading}
onPress={handleSave}
>
Save Changes
</Button>
</Card.Actions>
</Card>
</ScrollView>
</SafeAreaView>
);
}
export default function App() {
return (
<BoodooProvider theme="light">
<UserProfileScreen />
</BoodooProvider>
);
}
const styles = StyleSheet.create({
container: { flex: 1 },
content: { padding: 16 },
badge: { marginBottom: 12 },
});
React Native Paper Component Parity in `boodoo/react-native`
All major components from React Native Paper are implemented as lightweight, pure native components with zero external dependencies and full theme support:
| Component | Category | Description & Sub-components |
|---|---|---|
Text |
Typography | Supports MD3 variants (displayLarge, headlineMedium, titleMedium, bodySmall, etc.) and semantic scale. |
Button |
Buttons | Modes: contained, outlined, text, elevated with icon, loading, and size props. |
IconButton |
Buttons | Round interactive icon button with size, custom colors, and disabled states. |
FAB |
Buttons | Floating action button with FAB.Group speed-dial expandable actions. |
SegmentedButtons |
Buttons | Multi-option toggle group with selected state styling and icon support. |
ActivityIndicator |
Indicators | Smooth loading spinner adhering to active theme colors. |
ProgressBar |
Indicators | Determinate and indeterminate progress tracking bar. |
Badge |
Data Display | Notification badge supporting numbers, text, or dot indicators. |
Avatar |
Data Display | Entity visuals with Avatar.Text, Avatar.Icon, and Avatar.Image. |
Chip |
Data Display | Interactive tag/filter chip with icon, avatar, selection, and close callback. |
Card |
Surfaces | Content container with Card.Title, Card.Content, Card.Cover, and Card.Actions. |
Surface |
Surfaces | Elevation-aware card/container surface mapped to Boodoo design tokens. |
Divider |
Layout | Content separator rule supporting bold and inset margins. |
TextInput |
Inputs | Inputs supporting outlined and flat modes with left/right accessories. |
Searchbar |
Inputs | Rounded search input with built-in clear action and icon accessories. |
HelperText |
Inputs | Validation error and info messages beneath inputs. |
Checkbox |
Selection | Check control with Checkbox.Item list integration. |
RadioButton |
Selection | Radio selection control with RadioButton.Group and RadioButton.Item. |
Switch |
Selection | Smooth native boolean toggle switch. |
ToggleButton |
Selection | Stateful toggles with ToggleButton.Group and ToggleButton.Row. |
List |
Navigation & Lists | Includes List.Section, List.Subheader, List.Item, List.Icon, and expandable List.Accordion. |
Appbar |
Navigation | Header navigation with Appbar.Header, Appbar.Content, Appbar.Action, and Appbar.BackAction. |
Drawer |
Navigation | Side navigation list with Drawer.Section and Drawer.Item. |
BottomNavigation |
Navigation | Tab bar navigation with active indicators and scene switching. |
Dialog |
Overlays | Modal dialog with Dialog.Title, Dialog.Content, Dialog.Actions, and Dialog.ScrollArea. |
Modal |
Overlays | General-purpose overlay dialog with backdrop dismissibility. |
Menu |
Overlays | Contextual dropdown popup menu with Menu.Item. |
Tooltip |
Overlays | Informational hint popover triggered on long press. |
Snackbar |
Feedback | Floating bottom notification banner with timed auto-dismissal and action buttons. |
Banner |
Feedback | Top advisory banner with action buttons and dismiss actions. |
DataTable |
Data Display | Tabular data presentation with DataTable.Header, DataTable.Title, DataTable.Row, DataTable.Cell, and DataTable.Pagination. |
TouchableRipple |
Utilities | Tactile touch feedback wrapper. |
Portal |
Utilities | Overlay rendering helper with Portal.Host. |
Cross-Library Component Matrix (RNE UI, Gluestack, Tamagui, UI Kitten, Wix)
In addition to React Native Paper, boodoo/react-native includes zero-runtime-overhead equivalents and drop-in component aliases for the most popular React Native ecosystems:
| Source Library | Key Components Implemented | Boodoo Exports |
|---|---|---|
| React Native Elements (RNE UI) | ButtonGroup, PricingCard, Tile, SearchBar, CheckBox, Slider, Header, BottomSheet, Overlay, Input, ListItem |
ButtonGroup, PricingCard, Tile, SearchBar, CheckBox, Slider, Header, BottomSheet, Overlay, Input, ListItem |
| gluestack-ui | Box, HStack, VStack, Center, Grid, Heading, Pressable, Alert, AlertDialog, Actionsheet, Skeleton, Textarea |
Box, HStack, VStack, Center, Grid, Heading, Pressable, Alert, AlertDialog, Actionsheet, Skeleton, Textarea |
| Tamagui | XStack, YStack, ZStack, Separator, Spinner, Progress, Sheet, TextArea, Popover |
XStack, YStack, ZStack, Separator, Spinner, Progress, Sheet, TextArea, Popover |
| UI Kitten (Eva Design) | Toggle, TopNavigation, Radio, RadioGroup, Card, Divider, Select |
Toggle, TopNavigation, Radio, RadioGroup, Card, Divider, Select |
| react-native-ui-lib (Wix) | TextField, Stepper, Picker, PageControl, ActionSheet, Toast, Table, Card.Section |
TextField, Stepper, Picker, PageControl, ActionSheet, Toast, Table, Card.Section |
Example 2: React Native Paper Integration (`boodoo/paper`)
If your project already uses react-native-paper, apply Boodoo's modern styling and color palette across all existing Material 3 components in just 2 lines:
import React from 'react';
import { Provider as PaperProvider } from 'react-native-paper';
import { boodooPaperLightTheme, boodooPaperDarkTheme } from 'boodoo/paper';
import { View, useColorScheme } from 'react-native';
import { Button, Card, Text } from 'react-native-paper';
export default function App() {
const isDark = useColorScheme() === 'dark';
const theme = isDark ? boodooPaperDarkTheme : boodooPaperLightTheme;
return (
<PaperProvider theme={theme}>
<View style={{ flex: 1, padding: 20, justifyContent: 'center' }}>
<Card mode="elevated">
<Card.Title title="React Native Paper + Boodoo" subtitle="Material 3 Restyled" />
<Card.Content>
<Text variant="bodyMedium">
Styled with Boodoo brand tokens, custom elevations, and curated radii.
</Text>
</Card.Content>
<Card.Actions>
<Button mode="contained" onPress={() => console.log('Pressed!')}>
Primary Action
</Button>
</Card.Actions>
</Card>
</View>
</PaperProvider>
);
}
Example 3: Custom StyleSheet with Design Tokens (`boodoo/tokens`)
Export and utilize raw tokens for custom native views, navigation bars, and gestures without any component abstraction:
import React from 'react';
import { View, Text, TouchableOpacity, StyleSheet } from 'react-native';
import { colors, spacing, radii, typography, shadows } from 'boodoo/tokens';
export function CustomCard() {
return (
<View style={styles.card}>
<Text style={styles.title}>Custom Native Card</Text>
<Text style={styles.body}>Built purely with boodoo/tokens.</Text>
<TouchableOpacity style={styles.button} activeOpacity={0.8}>
<Text style={styles.buttonText}>Explore Tokens</Text>
</TouchableOpacity>
</View>
);
}
const styles = StyleSheet.create({
card: {
backgroundColor: colors.white,
padding: spacing[4],
borderRadius: radii.lg,
...shadows.md,
},
title: {
fontSize: typography.sizes.xl,
fontWeight: typography.weights.bold,
color: colors.dark,
marginBottom: spacing[2],
},
body: {
fontSize: typography.sizes.base,
color: colors.gray600,
marginBottom: spacing[4],
},
button: {
backgroundColor: colors.primary,
paddingVertical: spacing[2] + 4,
paddingHorizontal: spacing[4],
borderRadius: radii.full,
alignItems: 'center',
},
buttonText: {
color: colors.white,
fontWeight: typography.weights.semibold,
fontSize: typography.sizes.base,
},
});
Example 4: Instant Expo Project Setup via CLI
Scaffold a production-ready Expo project configured with Boodoo Native components using a single terminal command:
npx create-boodoo my-mobile-app
Select option 10) React Native Mobile (Expo). Then run:
cd my-mobile-app
npm install
npx expo start
Scan the QR code with your iOS camera or Expo Go on Android to test live on your physical device.
Download Standalone Mobile Starter Zip
Prefer a direct archive download? Grab the pre-packaged Expo & Boodoo Native mobile starter bundle below:
React Native Mobile Starter .zip
Includes Expo SDK 51 configuration, App.js with Boodoo UI components, package.json, and app.json.