Skip to content

Why is className named as UNSAFE_className when using Combobox? #2781

Answered by reidbarber
deadcoder0904 asked this question in Q&A
Discussion options

You must be logged in to vote

In short, from the Escape Hatch section of the Styling page in the docs:

The reasoning behind this is that future updates to Spectrum design may cause unintended breaking changes in products.

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.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@snowystinger
Comment options

@deadcoder0904
Comment options

Answer selected by deadcoder0904
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants