Next.js Discord

Discord Forum

Tailwind config

Unanswered
Great Crested Flycatcher posted this in #help-forum
Open in Discord
Great Crested FlycatcherOP
I want to define a linear gradient in my tailwind config file but when i do and i try applying the border to my div it does not work

this is my config: borderColor: {
primary: "linear-gradient(to bottom right, #6d6d6d, #191A1C)",
},

and this is where i wanna apply it: <div className="border w-44 border-primary ">yes</div>

1 Reply

@Great Crested Flycatcher I want to define a linear gradient in my tailwind config file but when i do and i try applying the border to my div it does not work this is my config: borderColor: { primary: "linear-gradient(to bottom right, #6d6d6d, #191A1C)", }, and this is where i wanna apply it: <div className="border w-44 border-primary ">yes</div>
You cant just create a gradient border in css using a simple border color.

There's plenty of tutorials on creating gradient borders online. Understand those first and then you can adapt them in tailwind (or you can just copy paste a tailwind alternative)