Skip to main content
Shipnative uses Unistyles 3.0 for styling. Theme support and dark mode work automatically.

Quick Reference

The Pattern

Common Theme Values

Full theme definition: apps/app/app/theme/unistyles.ts

Key Rules

Never hardcode values. Always use theme tokens.
This ensures:
  • Dark mode works automatically
  • Consistent design across your app
  • Easy theme customization later

Dark Mode

It’s automatic! Semantic color names switch between light and dark:
No conditional logic needed. Just use theme colors and it works.

Detecting Dark Mode

Migration Note: The old useAppTheme() hook has been removed. Always use useUnistyles() and UnistylesRuntime for theme access and switching.

Component Showcase

Shipnative includes a visual gallery of all components. Open it via:
  • iOS Simulator: Cmd + D → Component Showcase
  • Android Emulator: Cmd + M → Component Showcase
  • Physical Device: Shake → Component Showcase
You’ll see every component with:
  • All variants and sizes
  • Light and dark mode versions
  • Copy-paste code snippets

Built-in Components

These are ready to use from @/components:

Variants

Unistyles lets you define style variants for different states:

Responsive Styles

Breakpoints are defined in apps/app/app/theme/unistyles.ts.

Common Mistakes


Customizing the Theme

Edit apps/app/app/theme/unistyles.ts to change:

Resources

  • Unistyles Documentation
  • Theme file: apps/app/app/theme/unistyles.ts
  • Components: apps/app/app/components/
  • Component Showcase: Dev Menu in running app