Component changelog
Form changelog
Component-specific release notes collected from the full changelog. This page filters the published entries that mention Form.
Release
v1.2.0
Minor Changes
-
befc825: Dialog, AlertDialog, Popover, Tooltip, HoverCard, menus, Select, Combobox and NavigationMenu take
actionsRefwithclose(). Field and Form takeactionsRefwithvalidate(). Field takes controlledtouchedanddirty, andField.ControltakesonValueChange. -
07e6783: Add
focusableWhenDisabledto Button. A disabled button with it stays in the tab order and usesaria-disabledinstead of nativedisabled, while clicks, Enter, Space and form submission stay blocked. Use it when a button disables itself during a pending request, so focus isn't lost, or when keyboard users need to reach a disabled button to learn why.In Clarity, only natively disabled buttons ignore the pointer, so a disabled button with
focusableWhenDisabledcan still show a Tooltip on hover explaining why. Hover colors no longer apply to disabled buttons. -
07e6783: Add
readOnlyto Checkbox, Switch and RadioGroup. A read-only control shows its state, stays focusable and in the form, but clicks and Space don't change it; it carriesaria-readonlyanddata-readonly. -
1898db0: Add Field: Root, Label, Control, Description and Error parts that link a label, help text and an error to any form control. Ids,
aria-describedbyandaria-invalidare wired automatically, Error renders only while the field isinvalid, and every part carriesdata-invalid,data-disabled,data-required,data-focused,data-touchedanddata-dirty. Compose Rad UI's TextField or TextArea with<Field.Control asChild>. -
1898db0: Field validates. It runs the browser's own checks (required, type, pattern, min/max) plus an optional
validatefunction, and shows the result pervalidationMode: after a submit attempt (onSubmit, the default), on blur, or on change, then updates live as the user fixes it.Field.Errorshows the validation message when it has no children, andmatchgives each problem its own message, for examplematch="valueMissing".Field.Validityrenders custom UI from the result. Parts carrydata-validanddata-invalid, andinvalidstill forces the error state.Resetting the form hides shown errors and clears
data-touchedanddata-dirty. -
befc825: Checkbox takes
indeterminate,uncheckedValue,formandinputRef; Switch takesuncheckedValue,formandinputRef; RadioGroup takesformandinputRef. Form reset now also works with aformoutside the tree. Slider takesthumbCollisionBehavior(none,push,swap),format/locale,largeStepandform; its thumbs takegetAriaLabel,getAriaValueTextandinputRef. NumberField takesallowOutOfRange,snapOnStep,formandinputRef. -
1898db0: Add Form, a form that validates its Fields before submitting. A submit with invalid fields shows every error and focuses the first invalid field, and async checks are awaited before submitting; plain controls outside a Field still get the browser's checks; once valid,
onFormSubmitreceives the values as an object. Pass server errors aserrors, keyed by field name: each shows on its Field and clears when the user edits it.validationModesets the default for every Field inside. -
befc825: Select, Combobox and Autocomplete take
filter(ornull),limit,locale,readOnly,form,inputRef,autoComplete,finalFocus,highlightItemOnHover,onItemHighlightedandloop. The default filter ignores case and accents;Combobox.useFilterandAutocomplete.useFiltergive the matchers. New parts:Select.Label,Combobox.StatusandAutocomplete.Status(announces the match count). Autocomplete takesautoHighlight,openOnInputClick,submitOnItemClickandmode. -
befc825: OTPField takes
mask,normalizeValue,onValueInvalid,inputMode,autoCompleteandform, and gainsOTPField.Separator. ArequiredOTPField now blocks form submission until every slot is filled. -
07e6783: Add OTPField for one-time codes: a group of single-character inputs that fill left to right. Typing moves forward, Backspace moves back, arrows, Home and End move between slots, and pasting or SMS autofill (
autocomplete="one-time-code") spreads a full code across them.validationTypelimits characters (numeric by default),type="password"masks them,onValueCompletefires once every slot is filled,autoSubmitsubmits the form, andnamesubmits the code through a hidden input. -
07e6783: Select and Combobox support
multiple. With it,value,defaultValueandonValueChangeuse arrays, picking an option toggles it and keeps the list open, the listbox getsaria-multiselectable, the trigger lists the selected labels (or callsrenderValuewith the arrays), and a form submits every value undername. Combobox addsCombobox.Chips, which shows the selected values as removable chips, and Backspace in an empty search removes the last one.
Release
v1.1.0
Minor Changes
-
3aabdde: feat(label): add Label component
@radui/ui/Labelrenders a native<label>that names a form control (htmlFor, or by wrapping it).- Matches Radix Label: double-clicking the label doesn't select its text, while controls nested inside it still get their own clicks.
- Supports
asChild,customRootClassand ref forwarding. - Clarity and baremetal styles included.
Release
v1.0.0
Patch Changes
-
55ee49a: Accessibility and Clarity cleanup across core controls: fix menu/navigation semantics and dismissal, form prop/state routing for Checkbox, Radio, TextArea, Fieldset, Text, and Slider, Avatar/Skeleton sizing, and contrast/alignment issues in the Clarity theme.
-
54b05e7: Add a Fieldset component with native legend semantics, grouped form-control slots, accessibility docs, and state data attributes.