Files
nativewind/website/docs/web/postcss.md
2022-06-20 10:58:23 +10:00

671 B

import StartCoding from "../_start-coding-components.md"

PostCSS

You to use the PostCSS to generate CSS stylesheets. You can then use className to style your React Native Web components using CSS.

:::caution This setup requires React Native Web 0.18 :::

Setup

1. Setup Tailwind CSS

Follow the setup guide for Tailwind PostCSS.

2. Add the NativeWind plugin to your tailwind.config.js

// tailwind.config.js
+ const nativewind = require("nativewind/tailwind/css")
+
module.exports = {
  content: [
    './App.{js,ts,jsx,tsx}',
  ],
+ plugins: [nativewind()],
};