@headlessui/react
2.2.10 · 7 Apr 2026MIT10.3M / weekRepositoryHomepagenpmAtom feed
72 stable releases, newest first, by release line. Notes are quoted as the maintainers published them.
- 1.x
1.6.3
25 May 2022Allow to override the
typeon theCombobox.InputEnsure the the
<Popover.Panel focus>closes correctlyOnly render the
FocusSentinelif required in theTabscomponent
Fixed
Allow to override the
typeon theCombobox.InputEnsure the the
<Popover.Panel focus>closes correctlyOnly render the
FocusSentinelif required in theTabscomponentEnsure the Transition stops once DOM Nodes are hidden
1.6.2
19 May 2022Fix closing of
Popover.Panelin React 18Ignore
Escapewhen event got prevented inDialogcomponentImprove
FocusTrapbehaviour
Fixed
Fix closing of
Popover.Panelin React 18Ignore
Escapewhen event got prevented inDialogcomponentImprove
FocusTrapbehaviourSimplify
PopoverTab logic by using sentinel nodes instead of keydown event interceptionEnsure the
Popover.Panelis clickable without closing thePopoverImprove "Scroll lock" scrollbar width for
DialogcomponentMake the
refoptional in thePopovercomponentEnsure the
refis forwarded on theTransition.Childcomponent
1.6.1
3 May 2022Fix hydration issue with
Tabcomponent
1.6.0
25 Apr 2022- Removed
Remove
focus()fromListbox.Option Ensure that you can add the
refprop to all componentsEnsure links are triggered inside
Popover.Panelcomponents
Fixed
Ensure that you can add the
refprop to all componentsEnsure links are triggered inside
Popover.PanelcomponentsImprove SSR for
TabcomponentFix
hoverscroll issue inListbox,ComboboxandMenucomponentsGuarantee DOM sort order when performing
Listbox,ComboboxandMenuactionsFix
<Transition>flickering issueImprove outside click support
Ensure that
appearprop on the<Transition>component works regardless of multiple rerendersReset
Combobox.Inputwhen the value gets resetFix double
beforeEntercallback on the<Transition>component caused by SSRAdjust active
item/optionindex onListbox,ComboboxandMenucomponentsOnly activate the
Tabon mouseupIgnore "outside click" on removed elements
- Removed
Remove
focus()fromListbox.Option Improve some internal code
Use
ownerDocumentinstead ofdocumentEnsure focus trapping plays well with the
TabandDialogcomponentsImprove syncing of
Combobox.InputvalueFix tree-shaking support
Stop propagation on the
Popover.ButtonFix incorrect
activeoption in theListboxandComboboxcomponentsProperly merge incoming props
Fix incorrect closing while interacting with third party libraries in
DialogcomponentMimic browser select on focus when navigating the
TabcomponentEnsure that there is always an active option in the
Combobox(#1279, #1281)Support classic form submissions in
RadioGroup,SwitchandComboboxcomponentsAdd React 18 compatibility
Fix open/closed state issue in
Dialog
Added
Add classic form submission compatibility via new hidden inputs
Add multiple value support to
ListboxandComboboxcomponents (#1243, #1355)Add support for clearing the value of a
ComboboxAdd
Dialog.Panelto resolve issues when scrolling long dialogs that useDialog.Overlay
Changes that might affect you
Migrating from
Dialog.OverlaytoDialog.PanelIn previous versions of Headless UI, closing a dialog was handled by a click handler that lived on the
Dialog.Overlaycomponent, 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.Panelcomponent, and changing how "click outside" is handled. Now, if you're using aDialog.Panel, the dialog is closed any time you click any element outside of it, rather than closing only when aDialog.Overlayis explicitly clicked.If you're using
Dialog.Overlayand not usingDialog.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 usingDialog.Panel, and to stop usingDialog.Overlay, instead using a simpledivelement:<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.Multiple value support for
ListboxandComboboxIf you have been using the insiders build for the new multiple value support for the
Listboxand/orComboboxcomponent, then you will have to add a newmultipleprop 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 thevalueprop or not.- <Listbox value={selectedPeople} onChange={setSelectedPeople} /> + <Listbox value={selectedPeople} onChange={setSelectedPeople} multiple />1.5.0
17 Feb 2022Ensure correct order when conditionally rendering
Menu.Item,Listbox.OptionandRadioGroup.OptionImprove controlled Tabs behaviour
Improve typeahead search logic
Fixed
Ensure correct order when conditionally rendering
Menu.Item,Listbox.OptionandRadioGroup.OptionImprove controlled Tabs behaviour
Improve typeahead search logic
Improve overall codebase, use modern tech like
esbuildand TypeScript 4!Improve build files
Ensure typeahead stays on same item if it still matches
Fix off-by-one frame issue causing flicker
Trigger scrollIntoView effect when position changes
Added
1.4.2
8 Nov 2021Stop the event from propagating in the
PopovercomponentAllow clicking on elements inside a
Dialog.OverlayEnsure interactability with
Popover.Panelcontents when using thestaticprop
Fixes
Stop the event from propagating in the
PopovercomponentAllow clicking on elements inside a
Dialog.OverlayEnsure interactability with
Popover.Panelcontents when using thestaticpropFix initial transition in
Transitioncomponent
1.4.1
30 Aug 2021Only add
type=buttonto real buttonsFix
escapebug not closing Dialog after clicking in DialogUse
console.warninstead of throwing an error when there are no focusable elements
1.4.0
29 Jul 2021Make
Disclosure.Buttonclose the disclosure inside aDisclosure.PanelAdd
aria-orientationtoListbox, which swaps Up/Down with Left/Right keys
1.3.0
21 Jun 2021Ensure that you can use
Transition.Childwhen using implicit TransitionsAdd new
enteredprop forTransitionandTransition.ChildcomponentsAdd
aria-disabledon disabledRadioGroup.Optioncomponents
Added
Ensure that you can use
Transition.Childwhen using implicit TransitionsAdd new
enteredprop forTransitionandTransition.Childcomponents
Fixes
Add
aria-disabledon disabledRadioGroup.OptioncomponentsImprove
disabledandtabindexprop handlingImprove React peer dependency version range
Improve types for the
openprop in theDialogcomponentImprove
aria-expandedlogicRemove undocumented
:classNamepropImprove types for
ListboxcomponentRemove explicit
:classpropImprove tree shaking
Improve peer dependencies for
react-dom, and for the future version18
1.2.0
10 May 2021Introduce Open/Closed state, to simplify component communication
Improve SSR for
DialogDelay focus trap initialization
Added
Introduce Open/Closed state, to simplify component communication
Fixes
Improve SSR for
DialogDelay focus trap initialization
Improve incorrect behaviour for nesting
Dialogcomponents
The
Open/Closedstate unlocks a feature where all our components can interact with each other. This means that you don't need to use the render prop function, and that you also don't need thestaticprop anymore for transitions. Here is an example in the docs that explains this: headlessui.dev/react/menu1.1.1
28 Apr 2021Fix form submission within Dialog
1.1.0
26 Apr 2021Improve search, make searching case insensitive
Fix unreachable
RadioGroupFix closing nested
Dialogcomponents when pressingEscape
Fixes
Improve search, make searching case insensitive
Fix unreachable
RadioGroupFix closing nested
Dialogcomponents when pressingEscape
Added
Add
disabledprop toRadioGroupandRadioGroup.OptionAdd
defaultOpenprop to theDisclosurecomponent
1.0.0
14 Apr 2021This is the v1 release of Headless UI - React
We introduced a bunch of new components for this release:
We also created a beautiful new documentation website: headlessui.dev/react
Changelog
Fixes
Fixed
outside clicknot re-focusing theMenu.Button(#220, #256)Fixed
outside clicknot re-focusing theListbox.Button(#220, #256)Force focus in
Menu.ItemsandListbox.Optionsfrom within the component itselfStop propagating keyboard/mouse events
Added
Add
Disclosure,Disclosure.ButtonandDisclosure.PanelcomponentsAdd
Dialog,Dialog.Overlay,Dialog.TileandDialog.DescriptioncomponentsAdd
PortalandPortal.GroupcomponentAdd
Switch.Descriptioncomponent, which adds thearia-describedbyto the actual SwitchAdd
FocusTrapcomponentAdd
Popover,Popover.Button,Popover.Overlay,Popover.PanelandPopover.GroupcomponentsAll components that accept a
className, can now also receive a function with the renderProp argumentAdd
RadioGroup,RadioGroup.Option,RadioGroup.LabelandRadioGroup.Descriptioncomponents
- 0.3.x
0.3.2
2 Apr 2021Reading the note…
0.3.1
11 Feb 2021Reading the note…
0.3.0
6 Feb 2021Reading the note…
- 0.2.x
0.2.0
6 Oct 2020Reading the note…
- 0.1.x
0.1.3
28 Sep 2020Reading the note…
0.1.2
25 Sep 2020Reading the note…
0.1.1
24 Sep 2020Reading the note…
0.1.0
24 Sep 2020Reading the note…
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.