I've a problem with the Nativewind variables. I created my project on the new version of expo (sdk 54) and therefore nativewind v4 but there is no more file tailwind.config.js to put variables, only postcss.config.mjs and if I put my variables in PostCSS or even if I create a file tailwind.config.js that doesn't work.
I followed the Nativewind v4 (by expo and SDK 54) documentation instructions:
Add the paths to all of your component files in your
tailwind.config.jsfile.
I'm trying to integrate it with TailwindCSS v4. It says that I can define the content and theme.extend values in tailwind.config.js. But I've noticed that the colors I declare there don't take effect.
tailwind.config.js
module.exports = {
content: [
"./app.{js,jsx,ts,tsx}",
"./app/**/*.{js,jsx,ts,tsx}",
"./components/**/*.{js,jsx,ts,tsx}",
],
theme: {
extend: {
colors: {
primary: "#1149ff",
tint: "#242424",
tintLight: "#949494",
background: "#020202",
card: "#121212",
border: "#2c2c2c",
},
},
},
}
I installed TailwindCSS v4 using PostCSS following the new steps with the separated plugin:
npm install tailwindcss @tailwindcss/postcss postcss
postcss.config.mjs
export default {
plugins: {
"@tailwindcss/postcss": {},
},
}
global.css
@import "tailwindcss";