Tamagui

Universal UI kit and style system for React Native + Web - with an optimizing compiler
GitHub
11.9k
Created 4 years ago, last commit 13 hours ago
209 contributors
11.4k commits
Stars added on GitHub, month by month
1
2
3
4
5
6
7
8
9
10
11
12
2024
Stars added on GitHub, per day, on average
Yesterday
+4
Last week
+5.1
/day
Last month
+5.7
/day
Last 12 months
+7.6
/day
npmPackage on NPM
Monthly downloads on NPM
1
2
3
4
5
6
7
8
9
10
11
12
2024
README
Shows a black logo in light color mode and a white one in dark color mode.

Style library, design system, composable components, and more.

Tamagui is a bunch of libraries for building UIs that share code across React and React Native.




  • @tamagui/core - Universal style library for React.
  • @tamagui/static - Optimizing compiler that works with core and tamagui.
  • tamagui - UI kit that adapts to every platform.

See tamagui.dev for documentation.

Tamagui lets you share more code between web and native apps without sacrificing the two things that typically suffer when you do: performance and code quality.

It does this with an optimizing compiler that outputs platform-specific optimizations - it turns styled components, even with complex logic or cross-module imports, into a simple div alongside atomic CSS on the web, or a View with its style objects hoisted on native.

The entirety of Tamagui works at compile time and runtime, and can be set up gradually, with initial usage as simple as importing it and using the base views and styled function.

We recommend checking out the starters with npm create tamagui@latest, they range from a simple learning example to a production-ready monorepo.

The compiler optimizes most and ultimately flattens a majority of styled components. In the ~500px² responsive browser section of the Tamagui website, 49 of the 55 or so inline styled components are flattened to a div. The homepage gains nearly 15% on Lighthouse with the compiler on.

Learn more on the website.

Contributing

To contribute to Tamagui reference the contributing guide.

To contribute to documentation reference the writing guide.