Theming
Skyle provides a theming system for extensive styling. You can customize the theme by passing it through the Provider. It automatically updates on change!
Configure with Provider#
Using the Theme#
Inside StyleSheets#
Inside Components#
- Class Component
- Functional Component
- Consumer (both)
The theme is passed through the theme prop when using the @styled decorator.
You can use the useTheme hook to access the theme.
TypeScript#
You can define a theme type by extending skyle's type declarations with your own declarations file: