For AI agents: fetch the complete documentation index at /llms.txt, the full documentation corpus at /llms-full.txt, the agent skill at /skill.md, or this page as Markdown at /docs/mobile/ui.md (or send Accept: text/markdown).
Native UI and theming
Screen primitives and shared view-models that mirror the web's design decisions.
Before you begin
Open your downloaded supastack project in Visual Studio Code using File → Open Folder, then choose Terminal → New Terminal. The repository root is the folder containing package.json, apps and packages. Run the command below there and leave its terminal open. If a command is not recognized, finish the tool installation guide before continuing.
Read the platform tutorial first. A server is the app process that answers browser or phone requests. Web reads apps/web/.env.local, Expo reads apps/mobile/.env.local, and database migration commands read root .env. The no-database /dashboard demonstration is separate from real /auth accounts, which need migrated Postgres. A phone or desktop-only checkout needs a separately running Web backend.
- Install the tools and get the code
- Learn commands, files and configuration
- Complete the Mobile first-run tutorial
corepack pnpm --filter @supastack/mobile startSetup and configuration
Screen primitives live in apps/mobile/src/ui — Screen, Card, Title, Detail, SectionLabel, ErrorText, AppButton — styled from apps/mobile/src/theme, so a visual decision made for the web maps onto the native chrome. In Appearance settings, the Match web app mode (apps/mobile/src/theme/synced.ts via GET/PUT /api/mobile/appearance) applies the signed-in user's synced web color pack from a local cache.
packages/ui-native carries the cross-platform view-model helpers: createEntitlementCard turns server entitlement state into a card's title, status, detail, action label, and accessibility label, so web and mobile render the same access decision.
apps/mobile/src/ui/screen.tsx exports:
Screen, Card, H1, H2, Title, Detail,
SectionLabel, ErrorText, AppButton
@supastack/ui-native → createEntitlementCard(input)
→ { title, status, detail, accessibilityLabel, action }Implementation workflow
Compose screens from the shared primitives before writing new elements; match the theme module's tokens and density instead of hardcoding sizes and colors.
Keep product copy out of primitives — they render labels, not copy decisions. Carry accessibility labels through custom rows the way createEntitlementCard does.
Verification and troubleshooting
Verify a screen in light and dark, at the largest text size, with screen-reader labels, and on a small device. A component that truncates or clips at 200% text is not done.