Tamagui shares UI code across React web and React Native with a style library, optional UI kit, and compile-time optimizer. It supports typed style props and Tailwind-style classes with platform-specific output.
Overview
Tamagui is a set of libraries for building user interfaces that reuse components and styling logic between React for web and React Native. Packages include a universal style core, an optional UI kit, and a static optimizing compiler that pairs with them.
The compiler lowers styled components and cross-module styles to efficient web output—often plain elements with atomic CSS—and hoisted style objects on native, aiming to preserve performance and ergonomics when sharing code. Usage can start gradually by importing base views and the styled helper, then adopt the compiler as needed.
Documentation and starters cover learning setups through production monorepos via npm create tamagui. Recent versions add Tailwind compatibility, tighter web alignment, and integration paths such as React Strict DOM while trimming surface area.
The project positions itself as a way to keep web and native apps in one design system without giving up responsiveness or type-safe styling at compile time and runtime.
Key features
- Shared web and native components
- Optimizing static compiler
- Universal style primitives
- Optional UI kit package
- Tailwind-compatible classes
- Typed inline style props
- Gradual adoption path
- Project starter templates
Use cases
- Cross-platform React apps
- Design systems for native and web
- Atomic CSS web bundles
- Monorepo UI sharing
- Migrating styled components