Introduction

Tamagui is a bunch of libraries that make sharing styling between React web and React Native much more performant, while bringing many features from CSS to React Native. It has an optional optimizing compiler that significantly improves performance.

  • @tamagui/core  is the core style library, it expands on the React Native style API with many features from CSS all without any external dependency.
  • @tamagui/static is an optimizing compiler that significantly improves performance through partial analysis, hoisting, and flattening.
  • tamagui UI is a bunch of unstyled and styled compound components for building common UI elements that adapt to each platform.

Install

Set up an app.

Quick start

Choose from a few starters:

npm create tamagui@latest

Highlights

  • Core only has one dependency - React - but supports the full React Native View and Text API, a superset of the React Native Style API, styled(), powerful hooks, and the typed design system helpers in ~28Kb on web.

  • A smart, partial-evaluating compiler gives 0-runtime performance with the ergonomics of writing your code however you want - even inline, logic-filled code is optimized.

  • Every feature works at runtime and compile-time, so none of the usual limits of 0-runtime libraries, while optionally getting the same great performance.

  • useTheme and useMedia hooks with signal-like granularity and dirty tracking.

  • Unstyled and styled versions of all components.

wwwwwwwwwwwwwwwwwww

Community

We're excited to see the community adopt Tamagui, raise issues, and provide feedback. Whether it's a feature request, bug report, or a project to showcase, please get involved!

wwwwwwwwwwwwwwwwwww

Credits

A big thanks to:

  • Stitches  for the variants pattern.
  • JSXStyle  for providing the original version of the compiler.
  • Modulz  for Radix of which we've adopted many APIs, and for the initial structure for this website.
  • Moti  for the foundation of the reanimated driver.
  • Framer Motion  for the AnimatePresence functionality.