Next.js Discord

Discord Forum

How do you add/remove a CSS class on NextJS?

Unanswered
Transvaal lion posted this in #help-forum
Open in Discord
Transvaal lionOP
I'm trying to create a list that has only one active selected item whenever the user clicks that item. How do you do this?

2 Replies

Please provide more info, what is the component you're trying to implement?
Generally, we will use clsx or tailwind-merge (for tailwind css)
For complex usage, like variants, we use class-variance-authority