Safer field IDs and markup
Fields sharing a name now get distinct generated IDs, and components use valid HTML nesting. Root name props have been removed.
Bug fixes
- Fixed invalid HTML nesting in Accordion, Badge, Breadcrumbs, Button, Checkbox, Image, ListItem, Radio, Spinner, and Switch by using spans inside labels, buttons, and spans while preserving layout.
- Fixed repeated
clip-pathIDs in theVerifiedTickicon.
Breaking changes
- Removed
namefrom TextField.Root, TextArea.Root, and PinField.Root. Previously, rootnameset the input ID whenidwas omitted. Useidfor an explicit ID; keepnameon TextField.Input, TextArea.Input, and PinField.Input for form submission.
Before → After
// Before
<TextField.Root name="email">
<TextField.Label>Email address</TextField.Label>
<TextField.Input name="email" />
</TextField.Root>
// After
<TextField.Root id="email">
<TextField.Label>Email address</TextField.Label>
<TextField.Input name="email" />
</TextField.Root>- Changed TextField, TextArea, PinField, FileUpload, and Slider to generate control IDs instead of reusing input names, so fields sharing a name have distinct label and description associations. Set
idon each root if external labels, selectors, or tests rely on the previous ID.
