Expo App UIExpo App UI
Constants

Theme Constants

Theme constants including colors, fonts, and sizes for consistent styling in Expo React Native. Learn how to use the theme constants in your project.

Installation

npx expo-app-ui add theme

:::note This will automatically add required dependencies: normalizeSize. :::

Usage

import { colors, fonts, size } from "@/constants/theme";

Exports

Colors

ColorValue
primary#007AFF
secondary#5856D6
success#34C759
warning#FF9500
error#FF3B30
white#FFFFFF
black#000000
gray#8E8E93
lightGray#F2F2F7
darkGray#1C1C1E
forest_green#228B22

Sizes

SizeValue
xs12
sm14
base16
md18
lg20
lg224
xl26
xl228
xxl32
txl40

Examples

Using Colors

<View style={{ backgroundColor: colors.primary }} />

Using Fonts

<Text style={{ fontFamily: fonts.inter }} />

Using Sizes

<Text style={{ fontSize: size.md }} />

Features

  • Comprehensive color palette
  • Normalized font sizes
  • Easy to customize
  • Consistent design system

On this page

Find this useful?

Buy me a coffee