Getting started
We put a lot of effort into making Unistyles as easy to use as possible. That’s why you no longer need to use useStyle
hook or wrap your app in any provider. Unistyles works inline with your existing code, so you can use it right away.
Prerequisites
Unistyles 3.0 is tightly integrated with Fabric
and most recent version of React Native. That’s why you need to use New Architecture and at least React Native 0.76.0. Additionally Unistyles depends on react-native-nitro-modules
and react-native-edge-to-edge
.
Required | Note | |
---|---|---|
React Native | 0.76+ | |
New Architecture | enabled | no option to opt-out |
Expo SDK | 52+ | (if you use Expo) |
Xcode | 16+ | Required by Nitro Modules |
Due to the fact that Unistyles is using Fabric
, it’s not possible to run it on Old Architecture
nor older versions of React Native. If you’re not able to meet this requirements, you can use Unistyles 2.0+ which is compatible with those versions.
Installation
Add babel plugin:
Finish installation based on your platform:
Unistyles offers first-class support for React Native Web. To run the project, we recommend following the guidelines provided by Expo.
🚧 Work in progress, we will share more details soon.
🚧 Work in progress, we will share more details soon.
As easy as React Native StyleSheet
Getting started with Unistyles couldn’t been easier. All you need to do is to replace React Native StyleSheet
with StyleSheet
exported from Unistyles. From now on you’re using StyleSheet
with superpowers 🦸🏼♂️.
By replacing StyleSheets you already have some benefits that are not avaiable in React Native StyleSheet:
- Variants
- Compound variants
- Dynamic functions
- Media queries
- Horizontal and vertical breakpoints for Native
- Custom web styles
- Custom web classes
When you’re ready to customize your styles and enable more features you can configure Unistyles.