Why is className
named as UNSAFE_className
when using Combobox?
#2781
-
I use Tailwind CSS & like it to quickly style it. I am also using combobox for a select because I like the autocomplete feature. I wanted to style my existing Tailwind component to use Combobox with just style replaced however I saw it uses Now I wanna ask why is there I also can't get Ideally, I would love to use Tailwind with React Spectrum & React Aria. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
In short, from the Escape Hatch section of the Styling page in the docs:
Also, React Spectrum components are intended to follow Adobe's Spectrum design system, and allowing loose extraneous styling can make it easy to create anti-patterns or violate the design system. If you're building a custom ComboBox, you may want to look at using React Aria to build your own, so you can easily style it however you like. The useComboBox page has a Styled examples section that includes a Tailwind CSS example that might be useful. |
Beta Was this translation helpful? Give feedback.
In short, from the Escape Hatch section of the Styling page in the docs:
Also, React Spectrum components are intended to follow Adobe's Spectrum design system, and allowing loose extraneous styling can make it easy to create anti-patterns or violate the design system.
If you're building a custom ComboBox, you may want to look at using React Aria to build your own, so you can easily style it however you like. The useComboBox page has a Styled examples section that includes a Tailwind CSS example that might be useful.