Platforms
How the same components behave on web, iOS and Android.One codebase
Components are written once with Tamagui and React Native primitives. Web builds resolve react-native to react-native-web; native builds use React Native directly.
Deliberate differences
- Select opens a dropdown on desktop and a bottom sheet on touch devices and native.
- Tooltip is web-only; touch devices have no hover, so only the trigger renders.
- Spinner uses a CSS-animated SVG on web and the native ActivityIndicator on iOS/Android.
- Icons render DOM SVG on web (no react-native-svg in web bundles) and react-native-svg on native.
Platform files
When behaviour must differ, the implementation is split with .native.tsx files, which Metro picks for iOS/Android and web bundlers ignore. This is used sparingly — only four files today.
components/spinner/Spinner.tsx # web
components/spinner/Spinner.native.tsx # iOS + AndroidWhat is verified
- Web: unit tests (jsdom + react-native-web), Next.js production build, Playwright end-to-end and visual tests.
- Android: the Expo playground runs in Expo Go on an Android emulator.
- iOS: builds with the same code path; not verified on a device in CI yet (requires macOS).