Replies: 2 comments
-
Hey, thank you for your question! 🙏 As of version 1.7.5 (released in December 2022) you can passthrough your own In this case, you want to put the custom id to the You also mention that you do want to provide a custom label. The good part is that Headless UI is headless and it doesn't come with any styles. This also means that you can use Does this answer your question? |
Beta Was this translation helpful? Give feedback.
-
Thanks a ton. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Listbox
andCombobox
do not accept anid
prop. They manage theirid
internally.We're building a component library on top of HeadlessUI, and we'd like the
id
to be customizable for two reasons:id
is customizable in all other components we provide.It's possible to apply your own
id
to theListbox
or theCombobox
with some "hacks", such as a custom<button/>
/<input/>
that blocks theid
that's forced into it withReact.children.map
, but I assume it's not a supported behavior.If this gets accepted, I'll make all the necessary PRs myself. I can implement it for other components, if you require it for consistency.
Beta Was this translation helpful? Give feedback.
All reactions