Unistyles Registry
All platforms
2.0.0
UnistylesRegistry is a singleton that allows you to register themes
, breakpoints
and pass additional config
.
There is no required timing for when you should call it. It can be done, for example, in your App.tsx
file or somewhere deeper.
Register themes
Register breakpoints
Add config
Available config options:
Key | Description | Default value | More info |
---|---|---|---|
adaptiveThemes | Enable Unistyles to automatically switch between dark and light themes based on the device settings. | false | link |
initialTheme | If you have registered more than one theme and know the initial theme upfront, you can pass the theme name here. | undefined | link |
plugins | A list of plugins that Unistyles will call after resolving the StyleSheet. | [] | link |
experimentalCSSMediaQueries | Web only: Inject CSS media queries instead of inline styles. | false | link |