Whirlwind is a utility-first styling framework specifically designed for React Native. It is heavily inspired by Tachyons and Tailwind CSS and uses low-level building blocks for rapidly building custom designs.
React Native Whirlwind is a utility-first CSS framework specifically designed for React Native, heavily inspired by Tachyons and Tailwind CSS. It offers a simple and consistent naming convention, no 3rd party dependencies, customizable theming, and promotes reusability while being performant and compatible with React Native and TypeScript.
Install React Native Whirlwind using npm or yarn:
npm install react-native-whirlwind
or
yarn add react-native-whirlwind
Create Your Theme Definition: Create a new file (e.g., theme.jsx) in your project source folder and call the createTheme function from react-native-whirlwind. Customize your theme by passing desired colors and properties as parameters:
import { createTheme } from 'react-native-whirlwind';
const { theme: t } = createTheme({
colors: {
primary: 'blue',
secondary: '#f0f0f0',
},
});
Use Your Theme: Import your theme.jsx in your app and components where needed:
import { t } from './theme';
React Native Whirlwind is a utility-first CSS framework with a focus on simplicity, performance, and customizability. By leveraging simple class names and a composable API, developers can rapidly prototype custom designs. With its compatibility with React Native and TypeScript, Whirlwind offers a modern and efficient solution for building mobile apps.