Skip to main content
Back to changelog

Safer field IDs and markup

vortex v0.24.0: 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

Breaking changes

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 id on each root if external labels, selectors, or tests rely on the previous ID.