nativewind-setup
v1.0.1
Published
π¨ Quick setup tool for NativeWind in Expo projects - Get Tailwind CSS working in React Native with zero configuration!
Maintainers
Readme
π¨ nativewind-setup
Quick setup tool for NativeWind in Expo projects - Get Tailwind CSS working in React Native with zero configuration!
β¨ Features
- π One Command Setup - Get NativeWind running in seconds
- π¦ Package Manager Choice - Supports npm, pnpm, and bun
- π― Expo Optimized - Specifically designed for Expo projects
- π§ Zero Configuration - All config files created automatically
- π‘ Smart Updates - Preserves existing code while adding NativeWind
- β‘ TypeScript Ready - Full TypeScript support out of the box
π Quick Start
Run this command in your existing Expo project directory:
# Using npx (npm)
npx nativewind-setup
# Using pnpx (pnpm)
pnpx nativewind-setup
# Using bunx (bun)
bunx nativewind-setupThat's it! π Your Expo project now has NativeWind configured and ready to use.
π What It Does
This tool automatically:
π₯ Installs required packages:
nativewindreact-native-reanimated@~3.17.4[email protected]tailwindcss@^3.4.17(dev dependency)prettier-plugin-tailwindcss@^0.5.11(dev dependency)
π Creates configuration files:
tailwind.config.ts- Tailwind configurationglobal.css- Global Tailwind stylesbabel.config.js- Babel configuration for NativeWindmetro.config.js- Metro bundler configurationnativewind-env.d.ts- TypeScript definitions
π§ Updates your app:
- Adds CSS import to
app/_layout.tsx - Preserves all existing code
- Adds CSS import to
π» Usage Example
After setup, you can use Tailwind classes in your components:
import { View, Text } from "react-native";
export default function HomeScreen() {
return (
<View className="flex-1 justify-center items-center bg-gray-100">
<Text className="text-3xl font-bold text-blue-600 mb-4">
Hello NativeWind! π¨
</Text>
<View className="bg-white p-6 rounded-xl shadow-lg">
<Text className="text-gray-800 text-center">
Tailwind CSS is now working in your Expo app!
</Text>
</View>
</View>
);
}π― Requirements
- Expo CLI project (created with
create-expo-appornpx create-expo-app) - Node.js 18+
- One of: npm, pnpm, or bun
π€ Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
π License
MIT License - see the LICENSE file for details.
π Acknowledgments
- NativeWind - For making Tailwind CSS work with React Native
- Expo - For the amazing React Native development platform
- Tailwind CSS - For the utility-first CSS framework
Happy coding with NativeWind and Expo! π
If you find this tool helpful, please consider giving it a β on GitHub!
