Giter VIP home page Giter VIP logo

tt0mmy / tamagui Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tamagui/tamagui

0.0 0.0 0.0 274.94 MB

Universal UI kit and style system for React Native + Web - with an optimizing compiler ๐Ÿš„

Home Page: https://tamagui.dev

License: MIT License

Shell 0.01% JavaScript 2.71% Ruby 0.05% Objective-C 0.01% TypeScript 96.09% CSS 0.63% Objective-C++ 0.19% Swift 0.01% HTML 0.05% PLpgSQL 0.24%

tamagui's Introduction

Tamagui

Universal UI for React Native & Web

  • @tamagui/core - Independent minimal style system on top of React Native/Web.
  • tamagui - Complete universal UI kit built on top of @tamagui/core.
  • @tamagui/static - Optimizing compiler that works with core and tamagui.

See tamagui.dev for documentation.

Tamagui lets you share more code between web and native apps while improving, rather than sacrificing, DX, performance, and code maintainability.

It does this with an optimizing compiler that flattens your React trees and outputs platform-specific optimizations like generating atomic CSS and media queries on the web.

The compiler enables a win-win-win: more performance, easier to write, works on every platform. Typically you'd have to choose two of: performant, cross-platform, concise. With Tamagui, you don't!

The compiler actually partially evaluates code including imports, logic, spreads, and nested ternaries. Any fully analyzable JSX usage will be flattened entirely (to a div on web, or View on native, rather than your custom defined component), leading to large reductions in tree-size.

Learn more on the website.

Contributing

Tamagui is a monorepo that makes it easy to contribute.

As of now Tamagui has some encrypted files relating to upcoming features that you'll need to remove before install:

./scripts/ci-prepare.sh

Then install:

yarn

While developing, you'll want to run the build watcher in a dedicated terminal:

yarn watch

It's easiest to use the sandbox project to test and develop things for web:

yarn sandbox

This runs a client-side only vite build of tamagui, with a complete configuration already set up.

To test on native, kitchen-sink is equally light weight and well set up:

yarn kitchen-sink

Once you've made changes, you can add tests. All compiler and CSS generation tests live in packages/static.

Before submitting a PR, check everything works across every combination of environments.

To do so, run the site, first in development to test if it works entirely at runtime:

yarn site

You replace _app.tsx to return just your component/use case. If it looks good, try running again with the compiler on:

yarn site:extract

Finally, if that looks good, build to production and test that:

yarn site:prod

This flow ensures it works with Vite, Webpack, Metro, Next.js with SSR, and with the compiler both on and off.

Our plan is to add integration tests to cover all this and more soon!

tamagui's People

Contributors

natew avatar ivopr avatar chrisdrackett avatar kyunghoon avatar wobsoriano avatar lexfrl avatar apperside avatar christianalares avatar dohomi avatar nandorojo avatar yamov avatar mrbirb avatar orlando avatar tombh avatar kungfu321 avatar hiroppy avatar seeden avatar leplay avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.