React Native Theming
@storybook/react-native-theming
A wrapper library around emotion 11 to provide theming support for react-native storybook
React Native Libraries
react
react-native
storybook
theming
@storybook/react-native-theming
React Native Libraries
javascript
npm
frontend
open source
Stars
1.3k
Weekly
930k
Open issues
19
Bundle
~25 kB
Installation
npm install @storybook/react-native-themingCode example
import { View, Text, StyleSheet } from "react-native";
import { NativeTheming } from "@storybook/react-native-theming";
export function Example() {
return (
<View style={styles.box}>
<Text style={styles.title}>React Native Theming</Text>
<NativeTheming />
</View>
);
}
const styles = StyleSheet.create({
box: { flex: 1, alignItems: "center", justifyContent: "center", gap: 8 },
title: { fontSize: 18, fontWeight: "600" },
});Pros & cons
Pros
- Actively maintained by ndelangen
- 930k weekly downloads. Battle tested
- First-class TypeScript definitions
- MIT licensed
Considerations
- Adds roughly ~25 kB to your bundle
- Needs client-only rendering in SSR frameworks
- 19 open issues on GitHub