UNPKG

react-native-unistyles

Version:
136 lines (107 loc) 6.67 kB
[<img alt="react-native-unistyles" src="assets/banner.png">](https://reactnativeunistyles.vercel.app/) [<img alt="react-native-unistyles-3.0" src="assets/v3.jpg">](https://github.com/jpudysz/react-native-unistyles/discussions/191) ![GitHub package.json version](https://img.shields.io/github/package-json/v/jpudysz/react-native-unistyles?style=for-the-badge) [![npm downloads](https://img.shields.io/npm/dm/react-native-unistyles?style=for-the-badge)](https://www.npmjs.com/package/react-native-unistyles) [![npm downloads](https://img.shields.io/npm/dt/react-native-unistyles?style=for-the-badge)](https://www.npmjs.com/package/react-native-unistyles) [![License: MIT](https://img.shields.io/badge/License-MIT-44CD11.svg?style=for-the-badge)](https://opensource.org/licenses/MIT) <br /> [![platform - expo](https://img.shields.io/badge/Expo-fff?style=for-the-badge&logo=expo&logoColor=black)](https://docs.expo.dev/) [![platform - web](https://img.shields.io/badge/React_Native_Web-white?logo=react&logoColor=57BDDA&style=for-the-badge)](https://www.w3.org/) [![platform - ios](https://img.shields.io/badge/iOS-000?logo=apple&style=for-the-badge)](https://developer.apple.com/ios/) [![platform - macos](https://img.shields.io/badge/macOS-000?logo=apple&style=for-the-badge)](https://developer.apple.com/macos/) [![platform - appletv](https://img.shields.io/badge/Apple_TV-000?logo=apple&style=for-the-badge)](https://developer.apple.com/tvos/) [![platform - visionos](https://img.shields.io/badge/visionos-000?logo=apple&style=for-the-badge)](https://developer.apple.com/visionos/) [![platform - android](https://img.shields.io/badge/Android-44CD11?style=for-the-badge&logo=android&logoColor=white)](https://developer.android.com/) [![platform - androidtv](https://img.shields.io/badge/Android_TV-44CD11?style=for-the-badge&logo=android&logoColor=white)](https://www.android.com/intl/pl_pl/tv/) [![platform - windows](https://img.shields.io/badge/windows-00a2ed?logo=windows&style=for-the-badge)](https://microsoft.github.io/react-native-windows/docs/getting-started) [![platform - ssr](https://img.shields.io/badge/SSR-black?style=for-the-badge&logo=next.js&logoColor=white)](https://nextjs.org/) ## Installation ```shell yarn add react-native-unistyles ``` Install CocoaPods dependencies / generate native folders with Expo: ```shell pod install or npx expo prebuild ``` ## [Documentation](https://reactnativeunistyles.vercel.app/) - [Start here](https://reactnativeunistyles.vercel.app/start/introduction/) - [API](https://reactnativeunistyles.vercel.app/reference/create-stylesheet/) - [Migration from StyleSheet](https://reactnativeunistyles.vercel.app/start/migration-from-stylesheet/) - [Examples](https://reactnativeunistyles.vercel.app/examples/all/) ## Features - 🚀 Shared core with C++ and JSI bindings - 🌉 Supports new architecture and bridgeless mode - 🔥 Crazy performance, adds under 0.1 ms to your StyleSheet - 🎳 Share up to 100% of your styles across platforms in monorepo - 🎯 Doesn't introduce new components, everything is packed in one hook - ⚛️ No React Context, no React Native events - 🖥️ Supports custom breakpoints, css-like media queries and variants - 🎨 Register multiple themes and change them with single function call - 🥳 Compatible with all React Native platforms - 🛡️ ~99% Test coverage - 🔌 Extend stylesheets with your own plugins - ⚔️ No 3rd party dependencies - and much much more! ## Sponsors [How to become a sponsor?](https://reactnativeunistyles.vercel.app/other/for-sponsors/) <a href="https://codemask.com"> <img src="https://avatars.githubusercontent.com/u/51229884?s=200&v=4" height="70px" width="70px" alt="codemask" /> </a> <a href="https://galaxies.dev"> <img src="https://avatars.githubusercontent.com/u/118431096?s=200&v=4" height="70px" width="70px" alt="galaxies-dev" /> </a> <a href="https://github.com/mobily"> <img src="https://avatars.githubusercontent.com/u/1467712?v=4" height="70px" width="70px" alt="mobily" /> </a> <a href="https://github.com/mwarger"> <img src="https://avatars.githubusercontent.com/u/686823?v=4" height="70px" width="70px" alt="mwarger" /> </a> <a href="https://github.com/biw"> <img src="https://avatars.githubusercontent.com/u/6139501?v=4" height="70px" width="70px" alt="biw" /> </a> <a href="https://github.com/happyfloat"> <img src="https://avatars.githubusercontent.com/u/186333704?s=200&v=4" height="70px" width="70px" alt="happyfloat" /> </a> <a href="https://github.com"> <img src="https://avatars.githubusercontent.com/u/138339?v=4" height="70px" width="70px" alt="anonymous" /> </a> <a href="https://github.com/hyoban"> <img src="https://avatars.githubusercontent.com/u/38493346?v=4" height="70px" width="70px" alt="hyoban" /> </a> ## Past sponsors <a href="https://github.com/kmartinezmedia"> <img src="https://avatars.githubusercontent.com/u/6308123?s=200&v=4" height="70px" width="70px" alt="kmartinezmedia" /> </a> <a href="https://github.com/levibuzolic"> <img src="https://avatars.githubusercontent.com/u/721323?v=4" height="70px" width="70px" alt="levibuzolic" /> </a> <a href="https://github.com/claudesortwell"> <img src="https://avatars.githubusercontent.com/u/41422239?v=4" height="70px" width="70px" alt="claudesortwell" /> </a> <a href="https://github.com/luoxuhai"> <img src="https://avatars.githubusercontent.com/u/37284154?v=4" height="70px" width="70px" alt="luoxuhai" /> </a> <a href="https://github.com"> <img src="https://avatars.githubusercontent.com/u/113348625?v=4" height="70px" width="70px" alt="anonymous" /> </a> <a href="https://github.com/abanobboles"> <img src="https://avatars.githubusercontent.com/u/9078953?v=4" height="70px" width="70px" alt="abanobboles" /> </a> ## Sponsor my work If you found the `react-native-unistyles` time-saving and valuable, please consider sponsoring my work. Your support enables me to continue creating libraries with a fresh approach. Github: https://github.com/sponsors/jpudysz Ko-fi: https://ko-fi.com/jpudysz Your support is greatly appreciated and helps me dedicate more time and resources to creating quality libraries. Thank you for all the support! ## UI Kits <a href="https://stacks.grapp.dev/"> <img src="https://raw.githubusercontent.com/grapp-dev/stacks/main/assets/stacks-logo.png" height="70px" width="70px" alt="Stacks" /> </a> ## Plugins [eslint-plugin-react-native-unistyles](https://github.com/RodSarhan/eslint-plugin-react-native-unistyles) ## Discord Looking for help or you want to chat with me? [Join Discord](https://discord.gg/akGHf27P4C) ## License MIT