Guides
Add a UI component
Put a component in the app or UI package that owns it.
Choose the owner before writing code.
| Consumer | Location |
|---|---|
| Expo only | apps/expo/src/components |
| Shared native UI | packages/ui-native |
| Docs only | apps/docs/src/components |
| Shared React 19 DOM UI | packages/ui-web |
| Next.js 14 web only | apps/web/src/components |
@statshub/ui-web currently targets Next 16 and React 19, so do not import it
into the React 18 web app.
Native package
Use deep imports from @statshub/ui-native; it has no root barrel.
import { Button } from "@statshub/ui-native/button/button";A package component must not import from an app. Move the dependency into the package or keep the component app-local.
Finish
Match neighboring component APIs and comments. Verify the relevant workspace:
pnpm check
pnpm --dir apps/expo exec expo export --platform ios
pnpm build:docsOpen the real screen or docs preview. Type checks cannot verify layout, interaction, accessibility, or native rendering.