# React Native Tailwind Starter
š A **React Native** project starter using **Tailwind CSS** for fast and responsive UI development.
This template allows you to quickly build React Native apps with the power of **Tailwind CSS** by integrating `tailwind-rn`, making your development process more productive and efficient.
## Features
- šØ **Tailwind CSS** support using `tailwind-rn`
- š **Fast styling** with utility-first classes
- šØ **Customizable** Tailwind configuration for easy theming
- šļø **Responsive layouts** out of the box
- š± **Cross-platform** support (iOS & Android)
## Installation
Follow these steps to set up the project and integrate Tailwind CSS into your React Native application.
### 1. Clone the Repository
```bash
git clone https://github.com/your-username/react-native-tailwind.git
cd react-native-tailwind
Run the following command to install all the required dependencies:
npm install
# or
yarn install
You will need to install tailwind-rn
to integrate Tailwind CSS:
npm install tailwind-rn
# or
yarn add tailwind-rn
After installing, initialize the tailwind.config.js
file to customize your Tailwind CSS configuration:
npx tailwind-rn init
If you're using any native modules or fonts, make sure to run:
npx react-native link
Run the following commands to start the development server for React Native:
npm run android
# or
npm run ios
You can start using Tailwind CSS in your React Native components as follows:
import React from 'react';
import { View, Text } from 'react-native';
import tailwind from 'tailwind-rn';
export default function App() {
return (
<View style={tailwind('flex-1 justify-center items-center bg-gray-100')}>
<Text style={tailwind('text-xl font-bold text-blue-500')}>
Welcome to React Native with Tailwind CSS!
</Text>
</View>
);
}
You can modify the tailwind.config.js
file to add custom colors, fonts, and other utility classes:
module.exports = {
theme: {
extend: {
colors: {
customBlue: '#1E40AF',
},
},
},
variants: {},
plugins: [],
};
Login Page | Onboarding Page |
---|---|
Onboarding Page | Signup Page |
---|---|
npm run android
ā Runs the app on Android emulator.npm run ios
ā Runs the app on iOS simulator.npm run start
ā Starts the development server.npm run build
ā Builds the app for production.š react-native-tailwind
āāā š assets # Static assets like images, fonts
āāā š src # Source code (components, screens)
āāā š App.tsx # Main app entry point
āāā š tailwind.config.js # Tailwind CSS configuration
āāā š README.md # This file
We welcome contributions! If you have any suggestions or improvements, feel free to open a pull request or create an issue.
This project is licensed under the MIT License - see the LICENSE file for details.
Built with ā¤ļø by [riffatadnan].