Skip to main content
196

Search Lumen

Find components, APIs, guides, and recipes.

GitHub
React Native docs
@santi020k/lumen-react-native

React Native Theming

Apply semantic tokens, follow system appearance, and verify light and dark themes. Learn how with Lumen for React Native.

Appearance

Choose and change the theme

Choose a theme and an appearance separately. LumenProvider follows the device by default. A LumenThemeScope can inherit that scheme or pin a single screen to light or dark.

tsx
import { LumenProvider, LumenThemeScope } from '@santi020k/lumen-react-native'
import { paperTheme } from '@santi020k/lumen-react-native/themes/paper'
import { santi020kTheme } from '@santi020k/lumen-react-native/themes/santi020k'

<LumenProvider definition={santi020kTheme} scheme="system">
  <Navigation />
  <LumenThemeScope definition={paperTheme} scheme="light">
    <Article />
  </LumenThemeScope>
</LumenProvider>

Style with semantic roles

Components consume semantic roles such as canvas, surface, ink, brand, success, warning, and danger. Keep product code on those roles rather than assigning one-off colors to individual components.

Verify both appearances

  • Switch the device between light and dark while the app is open.
  • Check text and icon contrast in default, disabled, error, and loading states.
  • Test the largest supported font scale and screen-reader labels in both schemes.
React Native docsNative primitives