Changelog
Published versions of @radui/ui. Minor and patch sections follow SemVer. Source: CHANGELOG.md in the repository.
Release
v1.2.1
Patch Changes
- 2d81c52Triggers rendered with
asChildkeep the child's own semantics. A link insideTooltip.Trigger,Popover.Trigger,Dialog.Triggeror any other trigger used to getrole="button"andtype="button", so screen readers announced it as a button. Now a link stays a link, a native button keeps its owntype, and only other elements (aspan, adiv) getrole="button".Buttonalready worked this way; every trigger now does too (#2332). - 8859953
Combobox,Checkbox,CheckboxGroup,RadioGroup,SwitchandFieldno longer restore their default value when the owning form'sresetevent is cancelled withpreventDefault(). They used to reset anyway, so a page that cancels resets lost the user's selection and submitted the default. The restore now runs after the event has finished dispatching, like a native control, so it also follows the browser's own reset of the form (#2344). - cd01923
childrenis optional in the types of parts that work without it:Checkbox.Root,Switch.Root,Progress.Root,Slider.Root,RadioGroup.RootandRadioGroup.Item, and the triggers ofDialog,AlertDialog,Tooltip,DropdownMenu,ContextMenuandMenubar. A wrapper typed fromReact.ComponentProps<typeof Checkbox.Root>no longer forces every call site to pass children (#2334). - b8cddb8
RadioGroupandRadioCardsrender their items directly inside theradiogroupelement. They used to sit in an extra<div role="group">, sodisplay: gridorflexwithgapon the root didn't lay them out, and assistive tech met agroupnested inside theradiogroup. The Clarity and Baremetal themes now lay out the root itself. If your own CSS targeted the inner wrapper (.rad-ui-radio-group-root > [role="group"]), move those rules to the root (#2336). - 47693b3
Select.Content,Combobox.ContentandAutocomplete.Contentacceptside,align,sideOffsetandalignOffset, asPopover.ContentandTooltip.Contentdo. They used to work only on the Root; on Content they were silently passed to the DOM, and React warned about unknown props. Values on Content win over the Root's (#2335).
Release
v1.2.0
Minor Changes
-
07e6783: Add
onOpenChangetoAccordion.Item: it's called withtrueorfalsewhenever that item opens or closes, including when opening another item closes it in single mode. -
befc825: Dialog, AlertDialog, Popover, Tooltip, HoverCard, menus, Select, Combobox and NavigationMenu take
actionsRefwithclose(). Field and Form takeactionsRefwithvalidate(). Field takes controlledtouchedanddirty, andField.ControltakesonValueChange. -
a265579: New state attributes:
ScrollArea.Rootand its scrollbars getdata-scrollingwhile the viewport scrolls anddata-hoveringwhile the pointer is over the area, and the root getsdata-has-overflow-x/data-has-overflow-y;Slider.Rootgetsdata-draggingduring a drag;Avatar.Rootgetsdata-loadingwhile the image loads anddata-errorif it fails. -
07e6783: Add Autocomplete: a text input with suggestions. Unlike Combobox, the value is whatever the user types; typing opens a filtered list, ArrowDown and ArrowUp move through it while focus stays in the input, and Enter or a click fills in the suggestion. The Combobox primitive gains
inputValue,defaultInputValueandonInputValueChangeto control its search text. -
07e6783: Add
delaytoAvatar.Fallback: it waits that many milliseconds before showing, so initials don't flash while a fast image loads.delayMs(the Radix name) works too. -
07e6783: Add
onLoadingStatusChangetoAvatar.Image: it's called with"loading","loaded"or"error"as the image loads, fails or changessrc(a missingsrcreports"error"). -
a265579: Every element with a
data-statenow also gets a boolean attribute for it:data-open/data-closed,data-checked/data-unchecked/data-indeterminate,data-pressed(toggles that are on),data-complete,data-dragginganddata-loading. Style with[data-open]or Tailwind'sdata-open:variant as well as[data-state="open"]. -
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. -
d83bc87: Add
highContrasttoButton: a solid button filled with the text colour and labelled in the background colour (near-black on light, near-white on dark), for a main call to action without an accent hue. Applies to the default andsolidvariants and setsdata-high-contrast. -
07e6783: CheckboxGroup supports a "select all" checkbox. Pass every item's value as
allValueson the Root and addparentto a Trigger: it's checked when every item is, mixed (aria-checked="mixed",data-state="indeterminate", a dash icon) when some are, and toggling it checks or clears them all. It submits nothing of its own. -
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. -
07e6783: Add
Combobox.ClearandAutocomplete.Clear: a button that clears the selection or typed text and returns focus to the trigger or input. It hides while there's nothing to clear (or passforceMount). -
07e6783: Add
Combobox.EmptyandAutocomplete.Empty: a message such as "No results" shown when the typed text matches no option. It renders outside the listbox as a polite live region, so screen readers announce it. -
07e6783: ContextMenu now opens on a 500ms touch long press, so it works on iOS Safari, which never fires
contextmenu. Moving the finger more than 10px cancels the press so the page can still scroll, and the click that follows lifting the finger no longer closes the menu. The Clarity trigger also turns off the iOS touch callout. -
07e6783: Dialog and AlertDialog support detached triggers. Create a handle with
Dialog.createHandle()and pass it toDialog.Rootand to any number ofDialog.Triggerelements rendered anywhere, each with apayload, for example one delete dialog for every row of a table. The Root's children can be a function of the payload, focus returns to the trigger that opened it, andhandle.open(payload)andhandle.close()work from code. -
07e6783: Add
modalto Dialog (and AlertDialog) roots:true(default, unchanged) traps focus, locks page scroll and lets the overlay block the page;"trap-focus"traps focus but leaves the page scrollable and clickable;falseleaves the page fully usable (no focus trap, noaria-modal). ExplicittrapFocus/aria-modalon the content still win. -
07e6783: Add DirectionProvider and
useDirection. Wrap an RTL app once with<DirectionProvider dir="rtl">and every Rad UI component inside uses right-to-left keyboard navigation and positioning: Tabs, TabNav, ToggleGroup, Toolbar, RadioGroup, CheckboxGroup, Accordion, Menubar, menus, NavigationMenu, Splitter, Slider, Select and Combobox. A component's owndirprop still wins. Setdiron<html>as well so text and CSS follow. -
befc825: New
Drawer.Provider,Drawer.IndentandDrawer.IndentBackground: the page eases back while any drawer is open. -
07e6783: Add
openOnHovertoDropdownMenu.Root, withhoverOpenDelay(default 100ms) andhoverCloseDelay(default 0), for navigation-style menus. The pointer can move into the menu without it closing, and clicking still toggles it. -
1898db0: Field's
validatecan return a promise for async checks, such as whether a username is taken. While it's pending, every part carriesdata-validatingandField.Validityreportsvalidating; a slower, older check never overwrites a newer result.validationDebounceTimewaits for typing to pause before validating inonChangemode. -
07e6783: Checkbox, Switch, Select and NumberField work inside
Field.RootwithoutField.Control: they take the field's id (soField.Labelnames them), name, disabled and required state, and getaria-describedbyfromField.DescriptionandField.Errorplusaria-invalidwhen the field is invalid. A control's own props still win. -
a265579: Checkbox, Switch, Select and NumberField inside
Field.Rootnow report focus, blur and edits to the field, sodata-focused,data-touchedanddata-dirtyfollow them, and they carry the field's state attributes themselves. Fields also getdata-filledwhile the control holds a value (non-empty text, a checked box, a picked option). Moving between a NumberField's input and its buttons doesn't count as leaving the field. -
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: Tooltip, HoverCard and Popover Content, menu Roots and the Select/Combobox/Autocomplete Root take
anchor(an element, virtual element, ref or function to position against instead of the trigger),positionMethod,collisionAvoidance(flip, shift or none per axis),stickyanddisableAnchorTracking. -
07e6783:
Tooltip.ContentandHoverCard.Contenttakeside,align,sideOffsetandalignOffset, likePopover.Content, and expose the resolveddata-sideanddata-align. HoverCard could only open below its trigger before.Tooltip.Root'splacementstill works whensideisn't set. Astyleprop onHoverCard.Contentno longer replaces its positioning styles. -
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. -
07e6783: Add
hiddenUntilFoundtoCollapsible.ContentandAccordion.Content. Closed content stays in the page withhidden="until-found", so the browser's find-in-page can search it, and a match opens the section. Useful for FAQs and docs where people search with Ctrl+F. -
07e6783: Add detached triggers to HoverCard:
HoverCard.createHandle()connects any number ofHoverCard.Triggers, rendered anywhere, to oneHoverCard.Root. Each trigger passes apayload, the Root's children can be a function of it, and the Root'sopenDelay/closeDelaystill apply. -
befc825:
HoverCard.Root'sonOpenChangegets details (reason,event,cancel()) as a second argument, and triggers takedelayandcloseDelaythat override the Root's.Popover.TriggertakesopenOnHover,delayandcloseDelay. -
ed15256: Add
forceMounttoCheckbox.IndicatorandRadioGroup.Indicator(and the CheckboxGroup primitive content): the indicator stays rendered while unchecked, withdata-state="unchecked", so it can animate out or reserve space. The radio indicator now also carriesdata-state. -
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. -
6ce6f63: Add
Menu(@radui/ui/Menu): the same component asDropdownMenuunder the name most design systems use. Parts, props and theme styles are shared. -
a265579: Add
arrowPaddingtoDropdownMenu.Root,ContextMenu.RootandMenubar.Menu: the minimum distance in px between the arrow and the menu's rounded corners (default 4). -
07e6783: DropdownMenu, ContextMenu and Menubar gain
CheckboxItem,RadioGroup,RadioItem,ItemIndicator,GroupandGroupLabel. Checkbox items toggle (checked,defaultChecked,onCheckedChange), radio items pick one value in their group (value,defaultValue,onValueChange), and both keep the menu open unlesscloseOnClickis set. They exposemenuitemcheckboxandmenuitemradiowitharia-checked,data-stateanddata-checked, and a GroupLabel names its Group for screen readers. -
07e6783: DropdownMenu supports detached triggers: create a handle with
DropdownMenu.createHandle()and share one menu between triggers rendered anywhere, each with apayload, for example a row-actions menu in a table. The menu anchors to the trigger that opened it, its children can be a function of the payload, ArrowDown on a trigger opens it, and clicking the open trigger closes it. -
befc825: Menus take
highlightItemOnHover,onItemHighlightedandcloseParentOnEsc, anArrowpart, andfinalFocuson Content. Escape in a submenu now closes only that submenu and returns focus to its trigger item, as the WAI-ARIA menu pattern describes; setcloseParentOnEscfor the old behaviour. -
07e6783: Add
closeOnClickto DropdownMenu, ContextMenu and Menubar items (defaulttrue). Set it tofalseto keep the menu open after an item is chosen, without callingpreventDefault(). -
07e6783: Add
modalto DropdownMenu and ContextMenu roots. While a modal menu is open, an outside press only closes it, page scroll is locked and the rest of the page is hidden from assistive technology. Off by default, so existing menus are unchanged. -
07e6783: Menus (
DropdownMenu,ContextMenu,Menubarand the menu primitive) takeside,align,sideOffsetandalignOffseton Root, matching the other floating parts, and their content exposesdata-sideanddata-align.placement,mainAxisOffsetandcrossAxisOffsetkeep working. -
07e6783: Meter and Progress add
Label,ValueandTrackparts plusformatandlocale. Label names the bar for screen readers, Value shows the formatted value (or a rounded percentage) as visible text, and Track holds the Indicator so Label and Value can sit next to the bar.formattakes Intl.NumberFormat options and also setsaria-valuetext. Without a Track, the root is still the bar. -
befc825: NavigationMenu takes
delay,closeDelay,orientationandonOpenChangeComplete; its Content plays enter and exit transitions and takesforceMount; a disabled Trigger doesn't open;Linktakesactive(aria-current="page") andcloseOnClick. -
ed15256:
NavigationMenu.Viewportcan anchor itself to the open item's trigger: passside,align,sideOffset,alignOffset,anchor,collisionAvoidance,collisionPadding,collisionBoundary,positionMethod,stickyordisableAnchorTrackingand it is positioned with collision handling, withdata-side/data-alignfor styling. Without these props it stays laid out by CSS as before. -
07e6783: Add
NavigationMenu.Viewport: one shared container that every open panel renders into. It exposes the open panel's size as--rad-navigation-menu-viewport-width/--rad-navigation-menu-viewport-heightso CSS can animate between panels, and keeps Tab order following the triggers. -
07e6783: Nested dialogs can be styled as a stack. A Dialog or AlertDialog opened inside another dialog's content gets
data-nested, and the parent's content getsdata-nested-dialog-openplus a--nested-dialogscount while it's open, so CSS can scale or dim the dialog behind. Escape still closes only the top dialog. -
07e6783: Add
formatandlocaleto NumberField. Withformat(Intl.NumberFormat options), the value shows as currency, a percent, a unit or with grouping; people can type formatted text such as "2,000" or "1.234,5", and it's reformatted when they leave the field. The value stays a plain number (25% is 0.25) and forms submit that number. The input keeps spinbutton semantics witharia-valuetext. -
07e6783: Add
NumberField.ScrubArea: drag over it (for example a short label) to change the value, like the inputs in design tools. Moving right or up increments by onestepperpixelSensitivitypixels (default 2), Shift useslargeStep,direction="vertical"switches the axis, and min and max still apply. It carriesdata-scrubbingwhile dragging. In Clarity it becomes a leading column of the field. -
07e6783: Add
smallStepto NumberField: Alt/Option + ArrowUp/ArrowDown moves by it for fine adjustments (defaults tostep / 10). Shift still useslargeStep. -
07e6783: Add
onValueCommitto NumberField: it's called with the settled value on blur or Enter after typing, when a held stepper button is released, and right away for keyboard steps, and only when the value actually changed. Use it to save or validate without reacting to every keystroke. -
07e6783: Add
allowWheelScrubto NumberField: while the input is focused, the mouse wheel steps the value (Shift useslargeStep) and the page doesn't scroll. Scrolling past an unfocused field never changes it. -
07e6783:
onOpenChangeCompletenow also works on Tooltip, HoverCard, DropdownMenu, ContextMenu, Menubar menus, Select and Combobox roots. -
07e6783: Add
onOpenChangeCompleteto Dialog, AlertDialog and Popover roots: it's called withtrueonce the open animation finishes and withfalseonce the close animation finishes and the content unmounts (immediately when nothing animates). Useful for moving focus, resetting forms or loading data after a transition. -
07e6783:
onOpenChangedetails also come from DropdownMenu, ContextMenu, Menubar menus, Select, Combobox and Tooltip, with anitem-pressreason when picking an item closes the popup. As with Dialog and Popover, only handlers that take a second argument receive them. -
07e6783: Popover, Dialog and AlertDialog
onOpenChangehandlers that take a second argument receive details: thereason(trigger-press,outside-press,escape-key,focus-out,close-pressand more), the DOMevent, andcancel()to keep the current state, for example an "unsaved changes" guard. Handlers that take one argument are called exactly as before. This matches Drawer, which already worked this way. -
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: Popover supports detached triggers. Create a handle with
Popover.createHandle()and pass it toPopover.Rootand to triggers rendered anywhere, each with apayload. The popover anchors to whichever trigger opened it, its children can be a function of the payload, and clicking the open trigger again closes it. -
07e6783: Add
initialFocusandfinalFocustoPopover.Content, matching Dialog: choose where focus goes when the popover opens (first tabbable element, stay on the trigger, or a ref) and where it returns when it closes (the trigger, nowhere, or a ref). Each also accepts a function. -
07e6783: Add
openOnHovertoPopover.Root, withhoverOpenDelay(default 300ms) andhoverCloseDelay(default 0). The popover also opens while the pointer rests on the trigger, and the pointer can move into it without it closing. Clicking still toggles it, so touch and keyboard users aren't left out. -
07e6783:
Popover.Rootmodalnow also accepts"trap-focus": focus is trapped in the popover (and the page is hidden from assistive technology) while the rest of the page still takes pointer input.modal={true}and the defaultfalseare unchanged. -
ed15256: Add
triggerIdanddefaultTriggerIdto Dialog, AlertDialog, Popover, Tooltip, HoverCard and DropdownMenu roots used with ahandle: the DOMidof the detached trigger the popup belongs to. While open, the popup is anchored to that trigger, shows its payload and marks itaria-expanded, also when opened from code withopen. Closing through a controlledopennow releases the trigger too. -
46fd398: The default theme now follows the system's reduce-motion setting. Every
--rad-ui-motion-duration-*token collapses to--rad-ui-motion-duration-reduced, so transitions and enter/exit animations finish at once (components still unmount on time), and the transition tokens keep colour changes but drop movement. A Skeleton stops pulsing, an indeterminate Progress keeps a slow pace, and Spinner keeps spinning. -
07e6783: ScrollArea marks which edges have hidden content: the root and viewport get
data-overflow-y-start,data-overflow-y-end,data-overflow-x-startanddata-overflow-x-end, plus--scroll-area-overflow-*variables with the distance in pixels, updated as it scrolls. Use them for fade masks or edge shadows that appear only where there's more to scroll.overflowEdgeThreshold(one number or per edge) sets how many pixels of hidden content an edge needs before it's marked. -
07e6783: Add
alignItemWithTriggertoSelect.Root: the list opens over the trigger with the selected option lined up on it, like a native select. It falls back to normal positioning when nothing is selected. -
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. -
07e6783: Select and Combobox add
GroupLabelandSeparator. Groups now haverole="group"and are named by their GroupLabel, so screen readers announce "Fruit, group" before its options; Separator draws a divider that stays out of the accessibility tree. -
07e6783: Add
itemsto Select and Combobox roots: a record of labels by value (or{ value, label }pairs). The trigger then shows the selected label before the list has mounted, even when items are rendered inside your own components. -
07e6783: Add
modalto Select and Combobox roots: while the list is open, page scroll is locked and an outside press only closes the list instead of reaching the page. Off by default. -
07e6783: Add
Select.ScrollUpArrowandSelect.ScrollDownArrow: they appear at the top and bottom edges of a long list while it can scroll that way, and resting the pointer on one scrolls the list. They're hidden from assistive technology. -
07e6783: Add
Select.ValueandSelect.Icon. Put<Select.Value placeholder="…" />insideSelect.Triggerand the trigger keeps all its own children (icons, prefixes) instead of being replaced by the selected label; Value shows the label, the placeholder (withdata-placeholder), or your render function's output.Select.Iconis a decorative chevron that replaces the built-in caret. Triggers without a Value part behave as before.Combobox.Valueworks the same way inCombobox.Trigger. -
07e6783: Add
minStepsBetweenValuesto Slider: in a range slider, neighbouring thumbs stay at least that many steps apart when dragged or moved with the keyboard. -
07e6783: Add
thumbAlignmentto Slider:"edge"keeps the whole thumb inside the track at the minimum and maximum (the fill, marks and pointer follow). The default"center"is unchanged. The Clarity thumb size is now the--rad-slider-thumb-sizevariable. -
07e6783: Add
Slider.Value, an<output>that shows the current value formatted with the root'sformatValue. A range slider shows both values, and a render function can customize the text. -
07e6783: Add
@radui/ui/Slotfor building your own components on Rad UI:Slotmerges its props and ref onto its child (the same behavior asasChild),mergePropsmerges props objects (classes joined, styles merged, handlers chained) andcomposeRefscombines refs. -
f045e5b: Table: redesigned default styling and new layout props. The Clarity recipe now uses neutral surface, border and text aliases (a framed panel, a header band with a bottom border, row dividers, hover highlight, tabular figures) instead of the accent scale, so it renders fully whatever the Theme accent is. New props:
align(start|center|end) onTable.CellandTable.ColumnCellHeader, andsize(small|medium|large) andvariant(surface|ghost) onTable.Root. -
07e6783: Add
Tabs.Indicator, a marker for the active tab rendered insideTabs.List. It exposes--active-tab-left,--active-tab-top,--active-tab-right,--active-tab-bottom,--active-tab-widthand--active-tab-heightrelative to the list, plusdata-activation-direction(left,right,up,down), so CSS can slide it between tabs. The Clarity theme animates it and respectsprefers-reduced-motion. -
07e6783: Add
onValueChange(value, event)to TextField,TextField.Inputand TextArea: it's called with the new text afteronChange, so you don't needevent.target.value. Clearing withTextField.Resetreports''. -
d706421: Anchored toasts: pass
anchor(an element, virtual element, ref or function) totoast()to show it beside that element instead of in the stack, e.g. "Copied" next to a copy button.side,align,sideOffsetandalignOffsetplace it (default: 8px above, centered) with collision handling. It announces like other toasts, closes on its timer (paused while hovered or focused), on Escape and withclose(id), and doesn't take a place in the stack.Toasterrenders them; with your ownToast.Provider, render<Toast.AnchoredToasts />once. -
a265579: Toasts can be swiped left and right as well as up and down. Set
swipeDirectionon a toast (one direction or a list) to choose its dismiss directions; it overrides the provider'sswipeDirections. A toast swiped sideways slides out to that side, and the toast element getsdata-swipe-direction(its allowed directions) anddata-swipe-out(the direction it was dismissed in). -
18cb779: Add
variantandsizetoToggleGroup.Root(asdata-variant/data-size). The default theme addsvariant="soft", a padded track with the pressed item as a raised pill and no dividers (a view switcher), andsize="small"for dense toolbars. The current look stays the default. -
befc825:
Toolbar.ButtonandToolbar.InputtakefocusableWhenDisabled, which keeps a disabled item in the arrow-key order. -
07e6783: Add
Toolbar.Group: a named group of related toolbar items. Arrow keys still move across groups, anddisabledturns off every button, link and toggle item inside it. -
07e6783: Add
Toolbar.Input, a text field that's one stop in the toolbar's arrow-key navigation. ArrowLeft and ArrowRight move the caret and leave the field only once the caret is at its start or end, and Home and End stay in the field. Roving focus now keeps a text field's own role and type instead of stamping button semantics on it. -
07e6783: Tooltip supports detached triggers: create a handle with
Tooltip.createHandle()and share oneTooltip.Rootbetween manyTooltip.Triggerelements, each with apayloadand an optional hoverdelay, for example every cell of a table. The tooltip anchors to the hovered or focused trigger, which getsaria-describedby, and closes on pointer leave, blur or Escape. -
befc825:
Tooltip.RoottakesdisabledanddisableHoverablePopup.Tooltip.TriggertakescloseOnClick(default true: clicking the trigger closes the tooltip), and a disabled trigger no longer opens it. -
07e6783: Add
Tooltip.Providerto share hover delays between tooltips. Once one tooltip in the group has opened, moving to another withintimeoutopens it instantly, and its content carriesdata-instantso CSS can skip the entry animation.Tooltip.RootopenDelayandcloseDelaystill override the provider. -
07e6783: Add
trackCursorAxistoTooltip.Root('none' | 'x' | 'y' | 'both'): the tooltip follows the pointer along that axis while it's over the trigger, for charts and long rows. A tracking tooltip closes as soon as the pointer leaves the trigger. -
07e6783: DropdownMenu, ContextMenu, Menubar, HoverCard, Select and Combobox content also get
data-starting-styleanddata-ending-style, and stay mounted (inside their Portal too) until the exit animation finishes. -
07e6783: Popover, Tooltip, Dialog and AlertDialog content (and the Dialog overlay) support CSS transitions on enter and exit. Opening renders one frame with
data-starting-styleand closing setsdata-ending-style, and the element stays mounted until its animations and transitions finish, so a plaintransitionon opacity or transform animates both ways. With no exit animation it unmounts at once, as before. Closed content still on screen can't be clicked or focused. -
befc825:
Tree.Roottakesexpanded,defaultExpanded,onExpandedChangeanddir. In right-to-left layouts ArrowLeft expands and ArrowRight collapses.
Patch Changes
- 589f4ba
Button asChildwith a link child (<a href>, or a component likenext/linkthat renders one) now keeps the link's own semantics: norole="button", notype="button", and the native tab order.asChildchildren are classified after they mount, so the server HTML and hydration match (fixes atabIndexhydration mismatch). Spans and custom elements still getrole="button",tabIndex={0}and Enter/Space activation. - 589f4ba
Button asChildwith a non-button child (span, div, custom element) now activates on Space the way a native button does: once, when Space is released, and not if focus moves away first. Holding Space no longer fires a click on every key repeat (#2289). Enter still activates on keydown. - 589f4baCheckbox and CheckboxGroup items no longer toggle on Enter; Space toggles them, as the WAI-ARIA checkbox pattern and native checkboxes do. Roving-focus items (CheckboxGroup, and other groups built on them) now run a consumer's
onKeyDownandonFocusalongside their own instead of replacing them, so passingonKeyDowntoCheckboxGroup.Triggerno longer breaks arrow-key navigation. - 6d12c79
Checkbox.Indicator: children now replace the default check/dash icon instead of being added next to it,classNamegoes on the indicator element instead of the icon, and the default icon is sized inem(the theme sizes it to the box) instead of a fixed 15px that overflowed small checkboxes. - a265579Combobox and Select: closed, force-mounted lists can no longer hold focus. A focus move queued while the list was opening could land in it after a quick Escape; focus now goes back to the trigger (or
finalFocus). - 589f4baCombobox and Select return focus to the trigger as soon as Escape closes the list, instead of after the focus manager's queued return, so focus is never left on force-mounted content in between (#2274).
- 2091f61Internal: one implementation for merging event handlers.
mergeProps(used byasChild) now goes throughcomposeEventHandlers, which forwards every argument; behaviour is unchanged (consumer handler first, ours skipped afterpreventDefault()). - ed15256Popover and Dialog (and AlertDialog) now call
onOpenChange(true, { reason: "trigger-press" })when a detached trigger opens them, so they can be controlled with a handle; canceling it keeps them closed. AdefaultOpenpopup with a handle no longer closes itself on mount. - 589f4baDialog, AlertDialog and Popover now play their closing transition: content and overlay stay mounted with
data-state="closed"until the exit transition or animation finishes, then unmount (straight away with reduced motion or no animation). Focus still returns at the moment of closing. - 589f4ba
Dialog.ContentwithinitialFocusset to a ref or a function now focuses that element withpreventScroll, so a tall, scrolling dialog opens at its top instead of jumping to the element (#2278). A function is now called once the dialog has opened, so it can look up elements inside the content. - 589f4baDialog and AlertDialog content in the default theme: centred on phones (the mobile margin no longer pushes it off the right edge, #2277); padded at the bottom when there's no Footer, and tall content scrolls inside the viewport instead of being clipped (#2285). The content box is now
box-sizing: border-box, so its padding counts inside the width: desktop dialogs are a little narrower than before and exactly--rad-ui-overlay-width-lgwide. - ed15256Clicking a
Field.Labelwhose control is a popup trigger (Select, Combobox) now focuses the trigger instead of opening the popup, like the label of a native<select>. Labels of checkboxes and switches still toggle them. - 8356a3cThe default theme now works in forced-colours mode (Windows High Contrast). Keyboard focus shows a system-colour outline (the theme's box-shadow rings are dropped in that mode), and parts that show state only with a fill (the Switch thumb and checked track, the Radio dot, the Slider range and thumb, Progress, the Tabs indicator, pressed toggles, the highlighted menu or list item) keep it in system colours.
- 07e6783
CheckboxGroupandRadioGroupalways render their group wrapper. With a single item wrapped in itsLabel, the group'sroleandidused to merge onto that<label>, so the checkbox or radio lost its accessible name. - f6efccd
HoverCard.Trigger asChildno longer puts the theme's link look (underline, text colour, font size) on your element: a Button inside it keeps the Button's styles. The link look stays on the trigger's default<span>. - 9662984Long lists stay fast while you move through them. In Select, Combobox, Autocomplete, DropdownMenu, ContextMenu and Menubar, moving the highlight used to re-render every item on each arrow key (300 options in a 300-item Select, twice that in a Combobox with search); now only the item losing the highlight and the one gaining it re-render.
- ed15256A Dialog or AlertDialog opened inside another no longer darkens the page a second time: its overlay gets
data-nestedand the themes keep it transparent. It still catches outside clicks. - f427af1
Combobox.Root'sonClickOutsidewas accepted but never called; it now fires when a press outside closes the list. On Combobox and Dialog it is deprecated in favour ofonOpenChange, whosedetails.reasonis"outside-press"in that case. - 589f4baProgress fills its container in the default theme. The hidden ~400px max width is gone (#2273); set
--rad-ui-progress-max-width, or a width onProgress.Root, for a narrower bar. - 07e6783Fix Slider in right-to-left layouts: the thumb, filled range, marks and pointer position now all mirror together. Before, the range filled from the right while the thumb stayed positioned from the left.
- cc18a8aFix modals used from inside a
Drawer. ADialogorAlertDialogopened from a drawer now stacks on top of it: screen readers can read it, clicks in it no longer close the drawer, Escape closes only the top one, and focus returns into the drawer. A portalledSelect(or menu) inside a drawer can be picked with the mouse again; the drawer no longer treats a press on it as the start of a swipe. - 54406efTabs: inactive
Tabs.Triggerno longer shows the browser's default grey button background and border when the app has no CSS reset; the theme resets the native button look. - 0c86596
TextArearespectsrows: the theme's default minimum height (7.5rem, 6rem small, 9rem large) now only applies whenrowsisn't set, so short text areas no longer need a CSS override. - fa9449cThe theme's fallback focus ring for plain buttons, links and inputs inside a
Themenow sits in thebasecascade layer, so app focus styles (Tailwindfocus-visible:utilities, or any unlayered CSS) override it. It is also drawn outside the element, so content that fills a button (an image, a canvas) no longer hides it. Rad UI components keep their own focus rings. - 07e6783
Themeno longer crashes wherewindow.matchMediais missing (some test runners and embedded webviews), only reads the system colour scheme whenappearance="system", and follows system changes on browsers that only support the olderaddListenerAPI. - 589f4baToast: the
hotkeyprop now works. Alt+T (Option+T) moves focus to the toasts by default, so keyboard users can reach their actions before they time out; an empty array turns it off, and the viewport exposes it asaria-keyshortcuts. Escape dismisses the focused toast and keeps focus in the viewport, and Escape on the viewport returns focus to where the hotkey was pressed. - befc825
ToggleGroup.Roottakesmultipleas a shorthand fortype="multiple". - 6ce6f63Tooltip and HoverCard fade out when they close instead of disappearing at once (HoverCard also fades in). Moving between tooltips in a shared group still swaps them instantly, and reduced motion turns the animations off.
Release
v1.1.4
Patch Changes
- 747344dPreserve Button styles when used as a DropdownMenu trigger.
- 10dfd50Theme: the accent scale (
--rad-ui-color-accent-*) now defaults to gray on the Theme container when noaccentColoris set. Previously every accent-based border and fill (Table frames, Button fills, focus rings) silently disappeared unless an accent colour was passed. An explicitaccentColoror a componentcolorstill wins. - 5d3475aForward TextArea shorthand refs to the native textarea.
Release
v1.1.3
Patch Changes
- 7e532c2Fix published component declarations that referenced internal aliases.
- 519eaa2Keep Tailwind
blackandwhiteutilities literal across appearances.
Release
v1.1.2
Patch Changes
- d495e2adocs: add component-specific changelog pages
- f70cd18Fix Dialog.Close and AlertDialog.Cancel types so they accept standard button props.
- c0b83c0Add stable NumberField part attributes and invalid state propagation.
- d318b3adocs(tab-nav): add keyboard and ARIA reference tables