Features
Design Tokens
10/11/2026
Customize the Expo theme registry, colors, typography, and spacing.
Theme architecture
The public compatibility entry point is constants/design-tokens.ts, which re-exports the modular theme system from constants/themes/. New code should import from @/constants/themes.
import { AppThemeRegistry, DesignTokens } from '@/constants/themes';The theme system separates:
- Base token models, colors, typography, and spacing.
- Theme definitions:
modern,retro,cozy, andpaper. AppThemeRegistry, which resolves the active theme and brightness.ThemeContext, which exposes the resolved tokens to components.
Using tokens
const { tokens } = useTheme();
return (
<View style={{ backgroundColor: tokens.background, padding: tokens.spacing.md }}>
<Text style={{ color: tokens.textPrimary }}>Hello</Text>
</View>
);Prefer tokens over hard-coded colors and spacing so dark mode, theme changes, and accessibility preferences remain consistent.
Customizing a theme
- Add or edit a theme definition under
constants/themes/definitions/. - Keep the definition compatible with the shared token model.
- Export it from
constants/themes/index.ts. - Register/select it through
AppThemeRegistry. - Verify light/dark brightness, text contrast, and reduced-motion/large-text settings.
Use
modern.theme.ts as the neutral baseline.Relevant files
constants/themes/index.tsconstants/themes/app-theme.tsconstants/themes/base/constants/themes/definitions/constants/theme-context.tsxstore/preferences-store.tsfor user appearance preferences
