Open
Description
Docs feedback
How can we improve Base UI documentation?
The docs for the Radio.Root component mention:
Represents the radio button itself. Renders a element and a hidden beside.
But that's incorrect; the hidden <input>
seems to be rendered as a sibling of the <button>
element rather than inside it.
Which begs the question... why can't <Radio.Root>
actually render a <label>
that contains both the <button>
and the <input>
? Seems strange to have to wrap it in a <label>
ourselves, as per the example... it's not really documented so maybe that's optional, but if we don't wrap it in a <label>
, how is the radio going to be labelled?