I am using NativeWind CSS which is a React-Native library which mimics tailwind css. My stylings don’t seem to be having an effect on the Button component. Stylings are working on other components just not this one.
<Button
title="Post"
className="rounded-full"
color="#568203"
accessibilityLabel=""
/>
2
Answers
use style prop to apply classes for button component in React-Native using TailwindCSS
For example, to apply the bg-blue-500 and text-white classes to a button, you can do the following:
For NativeWind, you can use the nw prop instead of style, and also import the class names,
The problem is that you are using color as a property… You need to use it as a className and write inline styles ass tailwind says. After configure NativeWind (and babel), you can do something like this: