tailwindlabs

headlessui

Completely unstyled, fully accessible UI components, designed to integrate beautifully with Tailwind CSS.

by tailwindlabs

TypeScript

TypeScript95.3%
Vue4.2%
JavaScript0.3%
Shell0.1%
CSS0%
HTML0%

Commit activity

Last 12 weeks · 0 commits

Full graph →

Community health

3 of 6 standards met

Community profile →
62
✓README✓License✓Contributing○Code of Conduct○Issue Template○PR Template

Recent PRs & issues

Quiet · Last activity 7mo ago
See all on GitHub →
willyou

What package within Headless UI are you using? @headlessui/react What version of that package are you using? 2.2.9 (the same code is on at eea57cf) What browser are you using? Chrome (Playwright Chromium 1.61) Reproduction URL Minimal repro below (Vitest browser mode, real Chromium). It replays the browser's transition timeline by stubbing , so it fails every run instead of a few percent of the time. Describe your issue** If a `transitionDialogPanelDialogBackdropdata-closed data-enter data-transitiondata-leaveuseTransitioncancelledRefdone()donewaitForTransitionCSSTransitionrun()run()getAnimations()data-closedPromise.allSettleddone()hasPendingTransitionsdone()inFlightClosed | EntersetVisible(false)done()done()falseCSSTransitionwaitForTransition` always waits on a promise. I'm happy to open a PR with this and a test if the approach looks right.

willyou · 2d ago
Hamzaisadev

Fixes #3916 When the options open, marks everything except the input, button and options as and . That includes a `labelsallowed@headlessui/reactComboboxuseInertOtherscombobox.test.tsxaria-hiddeninertmain`. All 2,046 tests and the type check pass. I'll add a CHANGELOG entry once this PR has a number.

Hamzaisadev · 6d ago
atsui-affinity

Fixes #3856 An item or option can be removed while a or is open. The and reducers then remove it from the array. They do not change or . The index now points past the end of the array. The next throws . already avoids this because its unregister reducer calls . This PR makes the and reducers do the same. If the active item was removed, the active index becomes . If an earlier item was removed, the index moves so the same item stays active. This is a smaller take on #3857. It reuses the existing helper and adds no null guards, because the reducer fix makes them unreachable. is not affected. Its already uses . How to reproduce issue Minimal React Code Here is a minimal repro, trimmed from the demo page I recorded. It uses @headlessui/react 2.2.10 and React 18 or 19. To trigger it: 1. Click "Remove last 3 items in 3s". 2. Open the menu and press End, so the last item ("Billing") is active. 3. Wait for the items to disappear. 4. Press Enter. You get Uncaught TypeError: Cannot destructure property 'dataRef' of 'machine.state.items[machine.state.activeItemIndex]' as it is undefined. The menu stays open and Enter does nothing. The timer stands in for real cases, such as a permission change or a filter that removes items while the menu is open. The Listbox version is the same, with Listbox.Option in place of Menu.Item. Video Before - error appears in menu item https://github.com/user-attachments/assets/620f68e3-997f-498d-8338-43f892c2f7ed After - fixed menu https://github.com/user-attachments/assets/7b3612ef-16e6-4ac9-b21b-3ea9e2a534cf Tests Two new tests each for and : The active item is removed. No item is active afterwards, and closes the menu. An item before the active one is removed. The same item stays active. All four fail without the fix and pass with it. The full React component suite, and prettier pass.

atsui-affinity · 6d ago
Structured data for AI agents

Repository: tailwindlabs/headlessui. Description: Completely unstyled, fully accessible UI components, designed to integrate beautifully with Tailwind CSS. Stars: 28829, Forks: 1218. Primary language: TypeScript. Languages: TypeScript (95.3%), Vue (4.2%), JavaScript (0.3%), Shell (0.1%), CSS (0%). License: MIT. Homepage: https://headlessui.com Topics: a11y, accessibility, components, headless-ui, headlessui, react, tailwindcss, vue. Latest release: @headlessui/react@v2.2.10 (7mo ago). Open PRs: 33, open issues: 95. Last activity: 7mo ago. Community health: 62%. Top contributors: RobinMalfait, thecrypticace, adamwathan, reinink, dependabot[bot], philipp-spiess, simonswiss, milhamm, NoelDeMartin, eps1lon and others.