Replies: 1 comment 1 reply
-
You can add multiple classes to the same element and dioxus will merge them together: div {
class: if true { "w-6" },
class: if false { "bg-red" }
} |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
How can I conditionally add a tailwind class to an rsx element?
So far my attempts have resulted in tailiwind not seeing the conditional code and as a result not generating the required class.
I see solutions applicable for Javascript, not Rust.
Thanks
Beta Was this translation helpful? Give feedback.
All reactions