NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #4495 most downloaded on npm
A set of completely unstyled, fully accessible UI components for React, designed to integrate beautifully with Tailwind CSS.
Last release 5 months ago
13 Apr 2026
Release timing varies
gaps range from 8 days to 4 months
Nearly every release is documented
notes for 60 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
6 years old
819 releases · first in 2020
One column per quarter.
Fix passing props on Fragment error due to Symbol(react.lazy)
Improve focus management in shadow DOM roots
Combobox when touching the ComboboxButton while dragging on mobile (#3795)Dialog components are scrollable on mobile (#3796)Combobox type based on onChange handler (#3798)ComboboxInput when Combobox is closed (#3798)Dialog on iOS works after interacting with a disallowed area (#3801)Ensure we are not freezing data when the static prop is used
static prop is used (#3779)onChange types are contravariant instead of bivariant (#3781)<summary> as a focusable element inside <details> (#3389)Maximum update depth exceeded crash when using transition prop (#3782)Tab in the ComboboxInput, correctly syncs the input value (#3785)--button-width and --input-width have the latest value (#3786)data-headlessui-state supplied to React.Fragment' warning (#3788)element in ref callback is always connected when rendering in a Portal (#3789)data-open on ComboboxInput is up to date (#3791)immediate prop value on the Combobox component works as expected (#3792)Fix incorrect double invocation of menu items, listbox options and combobox options
Fix immediately closing Listbox by requiring some cursor movement
Fix listbox closing immediately after opening on touch devices
Fix Combobox error (unexpected undefined) when using virtual mode
Combobox error (unexpected undefined) when using virtual mode (#3734)Add a quick trigger action to the Menu, Listbox and Combobox components
Menu, Listbox and Combobox components (#3700)Label component should open <Input type="file"> (#3707)Label component works (#3709)Listbox not focusing first or last option on ArrowUp / ArrowDown (#3721)Menu inside a Dialog (#3722)Menu when other Menu is opened (#3726)Improve Menu component performance
Accept tabIndex on the Checkbox component
tabIndex on the Checkbox component (#3645)tabIndex on the RadioGroup component (#3646)ownerDocument when using internal Portal component (#3594)@tanstack/react-virtual to fix warnings in React 19 projects (#3588)aria-invalid attributes to have a valid 'true' value (#3639)invalid prop to Combobox component (#3677)Unexpected undefined crash in Combobox component with virtual mode (#3678)### Added - Add React 19 support
Use React.JSX instead of deprecated global JSX
Ensure Element is available before polyfilling to prevent crashes in non-browser environments
Fix crash when using as={Fragment} on MenuButton, ListboxButton, DisclosureButton or Button components
as={Fragment} on MenuButton, ListboxButton, DisclosureButton or Button components (#3478)Prevent crash in environments where Element.prototype.getAnimations is not available
Element.prototype.getAnimations is not available (#3473)Fix ListboxOptions being incorrectly marked as inert
Fix transition bug on Firefox, triggered by clicking the PopoverButton in rapid succession
PopoverButton in rapid succession (#3452)Fix components not closing properly when using the transition prop
transition prop (#3448)Ensure Transition component state doesn't change when it becomes hidden
Fix prematurely added anchoring styles on ListboxOptions
ListboxOptions (#3337)unmount on Dialog works in combination with the transition prop on DialogBackdrop and DialogPanel components (#3352)Combobox component when in virtual mode when options are empty (#3356)anchor prop (#3357)transition and focus prop combination for PopoverPanel component (#3361)Popover components (#3362)Dialog component (#3365)flushSync warning for Combobox component with immediate prop enabled (#3366)Fix issues spreading omitted props onto components
We just released Headless UI v2.1 for React, which dramatically simplifies our transition APIs and adds support for rendering multiple dialogs as sibl
We just released Headless UI v2.1 for React, which dramatically simplifies our transition APIs and adds support for rendering multiple dialogs as siblings. See our announcement blog to learn more.
Dialog components at once (without nesting them) (#3242)DialogBackdrop component (#3307, #3310)PopoverBackdrop component to replace PopoverOverlay (#3308)Combobox open when clicking scrollbar in ComboboxOptions (#3249)ComboboxInput does not sync with current value while typing (#3259)Combobox component when using native scrollbar (#3190)ComboboxOptions while closing (#3304)style prop on ComboboxOptions, ListboxOptions, MenuItems, and PopoverPanel components (#3250)Checkbox when it is disabled (#3251)useId instead of React internals (for React 19 compatibility) (#3254)Transition and TransitionChild components (#3303)Tab and Shift+Tab keys when the Listbox component is open (#3284)Mark SwitchGroup as deprecated, prefer Field instead
Escape to close the Dialog component (#3218)virtual and non-virtual mode in Combobox component (#3236)PopoverPanel component moves focus inside (without using PortalGroup) (#3239)defaultValue is used (#3240)SwitchGroup as deprecated, prefer Field instead (#3232)fieldset instead of div by default for Fieldset component (#3237)Make sure disabling demo mode on Combobox works
Combobox works (#3182)Improve performance of internal useInertOthers hook
useInertOthers hook (#3181)Remove accidental deprecation comments on DialogPanel and DialogTitle
DialogPanel and DialogTitle (#3176)Deprecate the RadioGroup.Option component in favor of new Radio component
We just released Headless UI v2.0 for React which includes a ton of new stuff:
Menu, Listbox, and more can now automatically position their popovers to be anchored to their trigger, adapting as needed to changes in the viewport.Checkbox component to complement our existing RadioGroup component, making it easy to build totally custom checkbox controls.Input, Select, Textarea, Label, Description, Fieldset, and Legend components that handle all of the ID generation and aria-* attribute mapping you need to do to connect form fields together.data-hover and data-focus attributes to your controls that behave more consistently across different devices than the native pseudo-classes.Combobox component can now handle giant lists of options with no performance issues.Checkbox component (#2887, #2962)Button component (#2887)Input component (#2887, #2902, #2940)Textarea component (#2887, #2902, #2940)Select component (#2887, #2902)Fieldset and Legend components (#2887)Field, Label, Description components (#2887, #2941)MenuSection, MenuHeading, and MenuSeparator components (#2887)ListboxSelectedOption component (#2887)DataInteractive component (#2887)CloseButton component and useClose hook (#3096)anchor, modal, and portal props to Combobox, Listbox, Menu and Popover components (#2887, #3075, #3097, #3111, #3115, #3121, #3124, #3133, #3138, #3148, #3152, #3154, #3157)autoFocus prop to focusable components (#2887)virtual prop to Combobox component (#2779, #3128, #3160, #3161, #3163)onClose prop to Combobox component (#3122)immediate prop to Combobox for immediately opening the Combobox when the input receives focus (#2686)--button-width CSS variable on the ListboxOptions, MenuItems, and PopoverPanel components (#2887, #3058)--input-width and --button-width CSS variables on the ComboboxOptions component (#3057)data-* attributes as an alternative to the existing data-headlessui-state attribute (#2887, #3035, #3061)disabled or aria-disabled attributes (#2890)displayValue callback in ComboboxInput component (#3048)multiple prop in Combobox component (#3099)ComboboxInput component (#3065, #3073)Transition component (#3074)ListboxOptions and MenuItems components (#3112)Dialog component (#2889)Checkbox, Switch and RadioGroup components (#3095)RadioGroup.Option component in favor of new Radio component (#2887)active prop in favor of new focus prop (#2887)ListboxOptions, ListboxOption, ComboboxOptions, ComboboxOption, and TabGroup components (#3109)div to Fragment on Transition components (#3110, #3147)Combobox component to have null value (#3064, #3100)ListboxButton component (#2972)entered prop on the Transition component (#3089)ComboboxOptions component (#3126)<h2 id="upgrading-from-v1">Upgrading from v1</h2>
Install the latest version of the package via npm:
npm install @headlessui/react@latest
The default rendered element has changed for a number of components in v2.0:
| Component | v1.x element | v2.0 element |
|---|---|---|
Transition |
div |
Fragment |
TransitionChild |
div |
Fragment |
ListboxOptions |
ul |
div |
ListboxOption |
li |
div |
ComboboxOptions |
ul |
div |
ComboboxOption |
li |
div |
TabGroup |
Fragment |
div |
If you are using any of these components without the as prop, you'll need to add the as prop and render the component with the element you need:
- <Transition ...>
+ <Transition as="div" ...>
Previously the Combobox component required an option to always be set, and you could opt out of this behavior using the nullable prop. In v2.0 comboboxes support empty values by default so you can remove this prop:
- <Combobox value={selected} onChange={setSelected} nullable>
+ <Combobox value={selected} onChange={setSelected}>
If you'd like to keep the previous behavior, update your onChange callback to only set the selected value if an option has actually been selected:
<Combobox
value={selected}
- onChange={setSelected}
+ onChange={(newValue) => setSelected((oldValue) => newValue ?? oldValue)}
onClose={() => setQuery('')}
>
Previously the Dialog component would automatically focus the first focusable child on open. This meant that you had to have at least one focusable element within your dialog, otherwise you would see a warning in your console.
In v2.0 that is no longer the case and the dialog's root element is focused instead on open.
If you'd like a child element to receive focus when your dialog is opened, you can add the autoFocus prop to any Headless UI form control:
<Dialog>
<DialogPanel>
- <Listbox ... />
+ <Listbox autoFocus ... />
</DialogPanel>
</Dialog>
For non-Headless UI components, you can add the data-autofocus attribute to any focusable element:
<Dialog>
<DialogPanel>
- <button>...</button>
+ <button data-autofocus>...</button>
</DialogPanel>
</Dialog>
The Menu, Combobox, and Listbox dropdowns are now rendered modal by default. When the dropdown is open the page is scroll-locked and all other page content is made inert.
While this is generally recommended behavior for these components, you can disable this using the modal prop:
- <ComboboxOptions ...>
+ <ComboboxOptions modal={false} ...>
Dialog.Overlay and Dialog.Backdrop components removedIn Headless UI v1.6 we deprecated the Dialog.Overlay and Dialog.Backdrop components. These have now been removed in v2.0.
If you're using either of these components, you can update your app to use the new DialogPanel approach:
<Dialog>
- <Dialog.Overlay className="..." />
+ <div className="..." />
+ <DialogPanel>
{/* ... */}
+ </DialogPanel>
</Dialog>
The previous component dot-notation has been deprecated in favor of using explicit imports for each individual component. This is to improve compatibility with RSC (React Server Components) and tree-shaking.
We recommend updating to this new API:
- import { Menu } from '@headlessui/react'
+ import { Menu, MenuButton, MenuItems, MenuItem } from '@headlessui/react'
function Example() {
return (
<Menu>
- <Menu.Button>My account</Menu.Button>
- <Menu.Items>
- <Menu.Item><a href="/settings">Settings</a></Menu.Item>
- <Menu.Item><a href="/support">Support</a></Menu.Item>
- <Menu.Item><a href="/license">License</a></Menu.Item>
- </Menu.Items>
+ <MenuButton>My account</MenuButton>
+ <MenuItems>
+ <MenuItem><a href="/settings">Settings</a></MenuItem>
+ <MenuItem><a href="/support">Support</a></MenuItem>
+ <MenuItem><a href="/license">License</a></MenuItem>
+ </MenuItems>
</Menu>
)
}
With the addition of the multi-purpose Field, Label and Description components in v2, we've deprecated the component-specific versions.
| v1.x component | v2.0 replacement |
|---|---|
Combobox.Label |
Label |
Dialog.Description |
Description |
Listbox.Label |
Label |
RadioGroup.Description |
Description |
RadioGroup.Label |
Label |
Switch.Description |
Description |
Switch.Group |
Field |
Switch.Label |
Label |
We recommend updating to these new components:
- import { Combobox } from '@headlessui/react'
+ import { Combobox, ComboboxInput, ComboboxOptions, Field, Label } from '@headlessui/react'
function Example() {
return (
- <Combobox>
- <Combobox.Label>Assignee:</Combobox.Label>
- <Combobox.Input />
- <Combobox.Options>{/* ... */}</Combobox.Options>
- </Combobox>
+ <Field>
+ <Label>Assignee:</Label>
+ <Combobox>
+ <ComboboxInput />
+ <ComboboxOptions>{/* ... */}</ComboboxOptions>
+ </Combobox>
+ <Field>
)
}
RadioGroup.Option componentWe've deprecated the RadioGroup.Option in favor of the more terse Radio component.
We recommend updating to this new component:
<RadioGroup>
- <RadioGroup.Option>{*/ ...*/}</RadioGroup.Option>
+ <Radio>{*/ ...*/}</Radio>
</RadioGroup>
We've also changed the default tag from div to span.
active prop in favor of focusWe've deprecated the active prop in favor of the new focus prop on the ComboboxOption, ListboxOption, ListboxOption, MenuItem, MenuItem, RadioOption, and RadioOption components.
We recommend updating to this new prop:
<MenuItem >
- {({ active }) => (
+ {({ focus }) => (
{/* ... */}
)}
</MenuItem>
@headlessui/tailwindcss packageWith the availability of the new data-* attributes in v2.0, we've deprecated the @headlessui/tailwindcss package.
We recommend updating to use the new data-* attributes instead. Start by removing this package:
npm remove @headlessui/tailwindcss
Next, replace the ui-* class modifiers with data-[*] modifiers:
<MenuItem
as="a"
href="#"
- className="ui-active:bg-blue-500 ui-active:text-white"
+ className="data-[active]:bg-blue-500 data-[active]:text-white"
>
{*/ ...*/}
</MenuItem>
Ensure Input, Select and Textarea expose Ref related types
Input, Select and Textarea expose Ref related types (#2902)Further fine tune scroll locking on iOS
Allow horizontal scrolling inside the Dialog component
Add immediate prop to for immediately opening the Combobox when the input receives focus
immediate prop to <Combobox /> for immediately opening the Combobox when the input receives focus (#2686)virtual prop to Combobox component (#2779)Checkbox componentRadio component as an alternative to the existing RadioGroup.Option componentButton componentInput componentTextarea componentSelect componentField, Label, Description, Fieldset and Legend componentsDataInteractive componentanchor and modal prop to ComboboxOptions, ListboxOptions, MenuItems and PopoverPanel componentsListboxSelectedOption componentMenuSection, MenuHeading, and MenuSeparator componentsdata-* attributes as an alternative to the existing data-headlessui-state="..." attributeautoFocus prop on focusable components (which maps to data-autofocus)data-autofocus in the dialog)<Dialog>'s onClose twice on mobile devices (#2690)<Dialog> (#2697)Tab.Panel components are hidden from the accessibility tree (#2708)role="alertdialog" to <Dialog> component (#2709)Combobox.Input component closes the Combobox (#2712)className prop when the <Transition /> component is currently not transitioning (#2722)<Disclosure.Panel> and <Popover.Panel> when as={Fragment} (#2760)Listbox component in Chrome (#2824)Fix Combobox activeOption render prop
activeOption render prop (#2973)disabled state on Tab component (#2918)Dialog.Panel (#2919)hidden attribute to internal Hidden component when the Features.Hidden feature is used (#2955)tabIndex on the Switch component (#2966)disabled state to hidden inputs in form-like components (#3004)selectedIndex for controlled Tab components (#3037)Allow users customize ID generation
<Dialog>'s onClose twice on mobile devices (#2690)<Dialog> (#2697)Tab.Panel components are hidden from the accessibility tree (#2708)role="alertdialog" to <Dialog> component (#2709)Combobox.Input component closes the Combobox (#2712)className prop when the <Transition /> component is currently not transitioning (#2722)<Disclosure.Panel> and <Popover.Panel> when as={Fragment} (#2760)Listbox component in Chrome (#2824)Dialog's onClose twice on mobile devices (#2690)Dialog (#2697)Tab.Panel components are hidden from the accessibility tree (#2708)role="alertdialog" to Dialog component (#2709)Combobox.Input component closes the Combobox (#2712)className prop when the Transition component is currently not transitioning (#2722)Disclosure.Panel and Popover.Panel when as={Fragment} (#2760)Listbox component in Chrome (#2824)Don't call 's onClose twice on mobile devices
<Dialog>'s onClose twice on mobile devices (#2690)TabPanel components are hidden from the accessibility tree (#2708)role="alertdialog" to <Dialog> component (#2709)ComboboxInput component closes the Combobox (#2712)<button> to be in nested components in <PopoverButton> (#2715)data-headlessui-state attribute when as="template" (#2787)Listbox component in Chrome (#2824)<Listbox multiple> and <Combobox multiple> (#2626)<MainTreeNode /> in Popover.Group component only (#2634)Dialog components on iOS (#2635)<Tab /> components are available when setting the next index (#2642)Combobox.Input component on page load (#2654)appear works using the Transition component (even when used with SSR) (#2646)nullable prop on the Combobox component (#2660)<Suspense> (#2663)<Listbox multiple> and <Combobox multiple> (#2626)MainTreeNode in Popover.Group component only (#2634)Dialog components on iOS (#2635)Tab components are available when setting the next index (#2642)Combobox.Input component on page load (#2654)appear works using the Transition component (even when used with SSR) (#2646)nullable prop on the Combobox component (#2660)Suspense (#2663)Fix form elements for uncontrolled and
<Listbox multiple> and <Combobox multiple> (#2626)<Listbox multiple> and <Combobox multiple> (#2626)<MainTreeNode /> in PopoverGroup component only (#2634)Dialog components on iOS (#2635)<Tab /> components are available when setting the next index (#2642)Disclosure component (#2645)ComboboxInput component on page load (#2654)nullable prop on the Combobox component (#2660)Combobox.Input value (#2568)aria-expanded purely based on the open/closed state (#2610)Enter even if no submit-like button was found (#2613)Ensure the caret is in a consistent position when syncing the Combobox.Input value
Combobox.Input value (#2568)Combobox component (#2574)aria-expanded purely based on the open/closed state (#2610)Enter even if no submit-like button was found (#2613)Menu and Popover components (#2448)FocusTrap is only active when the given enabled value is true (#2456)<Transition appear> from overwriting classes on re-render (#2457)Menu and Listbox options while searching (#2471)Portal component, does not close the Popover component (#2492)types condition to the front (#2469)Fix memory leak in Popover component
Popover component (#2430)FocusTrap is only active when the given enabled value is true (#2456)activeIndex is up to date for the Combobox component (#2463)Menu and Listbox options while searching (#2471)Portal component, does not close the Popover component (#2492)types condition to the front (#2469)Transition component (#2374)FocusTrap event listeners once document has loaded (#2389)className hydration for <Transition appear> (#2390)Combobox types to improve false positives (#2411)className correctly when it’s a function (#2412)form prop to form-like components such as RadioGroup, Switch, Listbox, and Combobox (#2356)Transition component (#2374)FocusTrap event listeners once document has loaded (#2389)className hydration for <Transition appear> (#2390)Combobox types to improve false positives (#2411)className correctly when it’s a function (#2412)Combobox.Input (#2426)form prop to form-like components such as RadioGroup, Switch, Listbox, and Combobox (#2356)Fix focus styles showing up when using the mouse
ComboboxInput when its Combobox is disabled (#2375)FocusTrap event listeners once document has loaded (#2389)<Dialog> when wrapping transition isn't showing (#2422)ref is properly handled in the RadioGroup component (#2424)form prop to form-like components such as RadioGroup, Switch, Listbox, and Combobox (#2356)Transition component completes if nothing is transitioning (#2318)<Switch> where possible (#2265)Dialog component in the FocusTrap component (#2322)XYZPropsWeControl and cleanup internal TypeScript types (#2329)Popover.Button components inside a Popover.Panel (#2333)Dialog component closes (#2326)Enable native label behavior for where possible
<Switch> where possible (#2265)Dialog component in the FocusTrap component (#2322)Dialog component closes (#2326)FocusTrap component only apply when mounted (#2331)Ensure the main tree and parent Dialog components are marked as inert
null values for the dataRef correctly (#2258)aria-multiselectable to [role=listbox] in the Combobox component (#2271)Combobox.Input when a Combobox.Option is selected (#2272)activeOptionIndex if the active option is unmounted (#2274)Ref type for forwarded Switch's ref (#2277)Dialog component when going into the Closing state (#2264)Don’t fire afterLeave event more than once for a given transition
afterLeave event more than once for a given transition (#2267)aria-multiselectable to [role=listbox] in the Combobox component (#2271)Combobox.Input when a Combobox.Option is selected (#2272)activeOptionIndex if the active option is unmounted (#2274)Dialog component when going into the Closing state (#2264)import * as React from 'react' pattern (#2242)Don't break overflow when multiple dialogs are open at the same time
Suspense boundary received an update before it finished hydrating" error in the Disclosure component (#2238)import * as React from 'react' pattern (#2242)Ensure disabled="false" is not incorrectly passed to the underlying DOM Node
disabled="false" is not incorrectly passed to the underlying DOM Node (#2138)Tab (after DOM order changes) (#2145)Tab key with non focusable elements in Popover.Panel (#2147)Combobox accessibility (#2153)headlessuiFocusGuard of relatedTarget in the FocusTrap component (#2203)FocusTrap in Dialog when there is only 1 focusable element (#2172)Tabs wrapping around when controlling the component and overflowing the selectedIndex (#2213)shadow-root bug closing Dialog containers (#2217)tabIndex on the Tab.Panel (#2214)Tab (after DOM order changes) (#2145)<Popover.Button> components (#2146)Tab key with non focusable elements in Popover.Panel (#2147)<Popover.Button /> in React 17 (#2163)failed to removeChild on Node bug (#2164)Combobox accessibility (#2153)headlessuiFocusGuard of relatedTarget in the FocusTrap component (#2203)FocusTrap in Dialog when there is only 1 focusable element (#2172)Tabs wrapping around when controlling the component and overflowing the selectedIndex (#2213)shadow-root bug closing Dialog containers (#2217)tabIndex on the Tab.Panel (#2214)Improve scroll restoration after Dialog closes
Dialog closes (b20e48dd)Fix regression where displayValue crashes
Reset form-like components when the parent resets
<form> resets (#2004)focus is going to window (#2019)shift+home and shift+end works as expected in the ComboboxInput component (#2024)ComboboxInput value (#2042)multiple mode without value prop (uncontrolled) for Listbox and Combobox components (#2058)id prop (#2060)null as a valid type for Listbox and Combobox in Vue (#2064, #2067)<form> resets (#2004)<Popover.Button /> multiple times (#2007)focus is going to window (#2019)shift+home and shift+end works as expected in the Combobox.Input component (#2024)Combobox.Input value (#2042)multiple mode without value prop (uncontrolled) for Listbox and Combobox components (#2058)enter and enterFrom classes in SSR for Transition component (#2059)id prop (#2060)Dialog unmounting problem due to incorrect transitioncancel event in the Transition component on Android (#2071)Expose close function for Menu and MenuItem components
<Popover.Button as={Fragment} /> crash (#1889)close function for Menu and Menu.Item components (#1897)useOutsideClick, add improvements for ShadowDOM (#1914)<Combobox.Input>'s onChange handler when changing the value internally (#1916)client-only to mark everything as client components (#1981)Call displayValue with a v-model of ref(undefined) on ComboboxInput
Prevent option selection in ComboboxInput while composing
Ensure Tab order stays consistent, and the currently active Tab stays active
<fieldset disabled> check to radio group options in React (#1835)Tab order stays consistent, and the currently active Tab stays active (#1837)Combobox.Label is properly linked when rendered after Combobox.Button and Combobox.Input components (#1838)forceRerender from Tab component (#1846)Add by prop for Listbox, Combobox and RadioGroup (#1482, #1717, #1814, #1815)
by prop for Listbox, Combobox and RadioGroup (#1482, #1717, #1814, #1815)@headlessui/tailwindcss plugin (#1487)Menu component when using tab key (#1673)Tabs don't change automagically (#1680)Dialog (#1716)element.focus() on <PopoverPanel> (#1719)Combobox re-opening keyboard issue on mobile (#1732)<tab> in the Combobox component (#1750)MenuButton if necessary when activating a MenuOption (#1782)ListboxOption and ComboboxOption components (#1812)value from the Combobox and Listbox components slot (#1822)scroll lock on iOS (#1824)by prop for Listbox, Combobox and RadioGroup (#1482, #1717, #1814, #1815)@headlessui/tailwindcss plugin (#1487)Menu component when using tab key (#1673)Tabs don't change automagically (#1680)Popover close to be passed directly to onClick handlers (#1696)Dialog (#1716)Combobox re-opening keyboard issue on mobile (#1732)Disclosure.Panel is properly linked (#1747)<tab> in the Combobox component (#1750)Combobox component (#1761)Menu.Button if necessary when activating a Menu.Option (#1782)Transition component's incorrect cleanup and order of events (#1803)unmount={false} (#1811)Listbox.Option and Combobox.Option components (#1812)ref stealing from children (#1820)value from the Combobox and Listbox components render prop (#1822)scroll lock on iOS (#1824)Tab component when using as={Fragment} (#1826)Transition component (#1823)Ensure CMD+Backspace works in nullable mode for Combobox component
Support children when using as="template"
<slot> children when using as="template" (#1548)Dialog component (#1546)<iframe> elements (#1552)Dialog on the client (#1566)Tab component when using arrow keys (#1584)aria-expanded for ComboboxInput component (#1605)Dialog component (#1546)<iframe> elements (#1552)Tab component when using arrow keys (#1584)Ensure Escape propagates correctly in Combobox component
Allow to override the type on the ComboboxInput
Ensure DialogPanel exposes its ref
DialogPanel exposes its ref (#1404)Escape when event got prevented in Dialog component (#1424)FocusTrap behaviour (#1432)Popover Tab logic by using sentinel nodes instead of keydown event interception (#1440)PopoverPanel is clickable without closing the Popover (#1443)Dialog component (#1457)Popover.Panel in React 18 (#1409)Escape when event got prevented in Dialog component (#1424)FocusTrap behaviour (#1432)Popover Tab logic by using sentinel nodes instead of keydown event interception (#1440)Popover.Panel is clickable without closing the Popover (#1443)Dialog component (#1457)ref optional in the Popover component (#1465)ref is forwarded on the Transition.Child component (#1473)Manually passthrough attrs for Combobox, Listbox and TabsGroup component
Make sure that the input syncs when the combobox closes
Combobox initially (#1148)Dialog usage in Tab component (#1149)PopoverPanel components (#1153)hover scroll issue in Listbox, Combobox and Menu components (#1161)Listbox, Combobox and Menu actions (#1168)ComboboxInput when the value gets reset (#1181)item/option index on Listbox, Combobox and Menu components (#1184)Dialog cycling (#553)Tab on mouseup (#1192)focus() from Listbox.Option (#1218)ownerDocument instead of document (#1158)el from each component (#1230)Tab and Dialog components (#1231)ComboboxInput value (#1248)PopoverButton (#1263)Dialog component (#1268)Tab (#1272)initialFocusRef correctly (#1276)Combobox (#1279, #1281)RadioGroup, Switch and Combobox components (#1285)nullable prop for Vue (2b109548b1a94a30858cf58c8f525554a1c12cbb)open prop over OpenClosed state (#1360)Listbox and Combobox components (#1243, #1355)Combobox (#1295)DialogPanel to resolve issues when scrolling long dialogs that use DialogOverlay (#1333)DialogOverlay to DialogPanelIn previous versions of Headless UI, closing a dialog was handled by a click handler that lived on the DialogOverlay component, so as long as your overlay was rendered behind your panel, clicking outside the panel would close the dialog.
This created an issue with scrollable dialogs, because it became easy to accidentally position your overlay on top of the scrollbar, which made it impossible to click the scrollbar without closing the dialog. You also couldn't scroll the dialog when your mouse was hovering over the overlay — only when your mouse was hovering over the actual panel.
We've fixed this in Headless UI v1.6 by adding a dedicated DialogPanel component, and changing how "click outside" is handled. Now, if you're using a DialogPanel, the dialog is closed any time you click any element outside of it, rather than closing only when a DialogOverlay is explicitly clicked.
If you're using DialogOverlay and not using DialogPanel, everything will continue to work exactly as it did before (including the bug I described above) to preserve backwards compatibility, but we highly encourage you to migrate to using DialogPanel, and to stop using DialogOverlay, instead using a simple div element:
<Dialog
:open="isOpen"
@close="closeModal"
class="fixed inset-0 flex items-center justify-center ..."
>
- <DialogOverlay class="fixed inset-0 bg-black/25" />
+ <div class="fixed inset-0 bg-black/25" />
- <div class="bg-white shadow-xl rounded-2xl ...">
+ <DialogPanel class="bg-white shadow-xl rounded-2xl ...">
<DialogTitle>Payment successful</DialogTitle>
<!-- ... -->
- </div>
+ </DialogPanel>
</Dialog>
Read through the updated Dialog documentation for more examples of using DialogPanel.
Listbox and ComboboxIf you have been using the insiders build for the new multiple value support for the Listbox and/or Combobox component, then you will have to add a new multiple prop to those components to tell the component that you are using multiple values. Previously this was automatically detected based on whether you were passing an array to the value prop or not.
- <Listbox v-model="selectedPeople" />
+ <Listbox v-model="selectedPeople" multiple />
ref prop to all components (#1116)Popover.Panel components (#1153)Tab component (#1155)hover scroll issue in Listbox, Combobox and Menu components (#1161)Listbox, Combobox and Menu actions (#1168)<Transition> flickering issue (#1118)appear prop on the <Transition> component works regardless of multiple rerenders (#1179)Combobox.Input when the value gets reset (#1181)beforeEnter callback on the <Transition> component caused by SSR (#1183)item/option index on Listbox, Combobox and Menu components (#1184)Tab on mouseup (#1192)focus() from Listbox.Option (#1218)ownerDocument instead of document (#1158)Tab and Dialog components (#1231)Combobox.Input value (#1248)Popover.Button (#1263)active option in the Listbox and Combobox components (#1264)Dialog component (#1268)Tab component (#1272)Combobox (#1279, #1281)RadioGroup, Switch and Combobox components (#1285)Dialog (#1360)Listbox and Combobox components (#1243, #1355)Combobox (#1295)Dialog.Panel to resolve issues when scrolling long dialogs that use Dialog.Overlay (#1333)Dialog.Overlay to Dialog.PanelIn previous versions of Headless UI, closing a dialog was handled by a click handler that lived on the Dialog.Overlay component, so as long as your overlay was rendered behind your panel, clicking outside the panel would close the dialog.
This created an issue with scrollable dialogs, because it became easy to accidentally position your overlay on top of the scrollbar, which made it impossible to click the scrollbar without closing the dialog. You also couldn't scroll the dialog when your mouse was hovering over the overlay — only when your mouse was hovering over the actual panel.
We've fixed this in Headless UI v1.6 by adding a dedicated Dialog.Panel component, and changing how "click outside" is handled. Now, if you're using a Dialog.Panel, the dialog is closed any time you click any element outside of it, rather than closing only when a Dialog.Overlay is explicitly clicked.
If you're using Dialog.Overlay and not using Dialog.Panel, everything will continue to work exactly as it did before (including the bug I described above) to preserve backwards compatibility, but we highly encourage you to migrate to using Dialog.Panel, and to stop using Dialog.Overlay, instead using a simple div element:
<Dialog
open={isOpen}
onClose={closeModal}
className="fixed inset-0 flex items-center justify-center ..."
>
- <Dialog.Overlay className="fixed inset-0 bg-black/25" />
+ <div className="fixed inset-0 bg-black/25" />
- <div className="bg-white shadow-xl rounded-2xl ...">
+ <Dialog.Panel className="bg-white shadow-xl rounded-2xl ...">
<Dialog.Title>Payment successful</Dialog.Title>
{/* ... */}
- </div>
+ </Dialog.Panel>
</Dialog>
Read through the updated Dialog documentation for more examples of using Dialog.Panel.
Listbox and ComboboxIf you have been using the insiders build for the new multiple value support for the Listbox and/or Combobox component, then you will have to add a new multiple prop to those components to tell the component that you are using multiple values. Previously this was automatically detected based on whether you were passing an array to the value prop or not.
- <Listbox value={selectedPeople} onChange={setSelectedPeople} />
+ <Listbox value={selectedPeople} onChange={setSelectedPeople} multiple />
Ensure correct order when conditionally rendering MenuItem, ListboxOption and RadioGroupOption
MenuItem, ListboxOption and RadioGroupOption (#1045)esbuild and TypeScript 4! (#1055)Menu.Item, Listbox.Option and RadioGroup.Option (#1045)esbuild and TypeScript 4! (#1055)Fix missing key binding in examples (#1036, #1006)
Your coding agent can read these notes before it upgrades. Set up the MCP server →