tailwind-reactnative Tailwind Templates

Tailwind Reactnative

This is a new React Native project, bootstrapped using @react-native-community/cli.

Getting Started

If you see error move temporary file

# using command
cd android
./gradlew clean
./gradlew --stop

To install Native Dependencies ( Tailwind)

# using command
yarn add nativewind
yarn add --dev [email protected]
npx tailwindcss init

For default react native not support className

Create file nativewind-env.d.ts

// nativewind-env.d.ts
/// <reference types="nativewind/types" />

In file babel.config.js

module.exports = {
   presets: ['module:@react-native/babel-preset'],
   plugins: ["nativewind/babel"] // Add this line
};

In file tailwind.config.js

// tailwind.config.js
/** @type {import('tailwindcss').Config} */
module.exports = {
  content: ["./src/**/*.{js,jsx,ts,tsx}"],
  theme: {
    extend: {},
  },
  plugins: [],
}

Learn More

To learn more about React Native, take a look at the following resources:

Top categories

Loading Svelte Themes