HHH
Saleh Ahmed
React Native + NativeWind Template
A minimal but robust template for React Native projects using NativeWind (TailwindCSS), Expo Router, and TypeScript with built-in dark/light theme support.
š Quick Start
git clone https://github.com/SalehAhmed10/Expo-ReactNative-NativeWind-Tailwind-Template.git
cd Expo-ReactNative-NativeWind-Tailwind-Template
npm install
npx expo start
š¦ What's Included
- ā”ļø Expo Router for navigation
- šØ NativeWind (TailwindCSS) for styling
- š Dark/Light theme with system sync
- š± Responsive design ready
- š TypeScript for type safety
šØ Theme System
The template includes a complete theme system with:
- System theme detection
- Manual theme toggle
- HSL color system with opacity support
- Consistent styling across light/dark modes
ā ļø Known Issues & Fixes
1. NativeWind Babel Error
Fix: Use NativeWind version 2.0.11
json { "dependencies": { "nativewind": "^2.0.11" } }
š Project Structure
āāā app/ ā āāā layout.tsx # Root layout with theme provider ā āāā index.tsx # Home screen ā āāā +not-found.tsx # 404 page āāā components/ ā āāā ThemeToggle.tsx # Theme toggle component āāā context/ ā āāā ThemeProvider.tsx # Theme management āāā babel.config.js āāā tailwind.config.js # Theme configuration āāā tsconfig.json
š Configuration Files
tailwind.config.js
Contains theme colors and configuration. Modify this file to customize your color scheme.
babel.config.js
Includes necessary configuration for NativeWind.
š± Supported Platforms
- iOS
- Android
- Web (with appropriate configuration)
š License
MIT
š¤ Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
No links added