Completely unstyled, fully accessible UI components, designed to integrate beautifully with Tailwind CSS.
by tailwindlabs3 of 6 standards met
What package within Headless UI are you using? @headlessui/react What version of that package are you using? 2.2.0 What browser are you using? N/A Reproduction URL https://codesandbox.io/p/devbox/headlessui-aria-labelledby-warning-y9yjjy Describe your issue* When providing an prop to the `aria-labelledByBaria-labelledbyaria-aria-label` component.
Repository: tailwindlabs/headlessui. Description: Completely unstyled, fully accessible UI components, designed to integrate beautifully with Tailwind CSS. Stars: 28423, Forks: 1192. 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.9 (5mo ago). Open PRs: 9, open issues: 73. Last activity: 2mo ago. Community health: 62%. Top contributors: RobinMalfait, thecrypticace, adamwathan, reinink, dependabot[bot], philipp-spiess, simonswiss, milhamm, NoelDeMartin, eps1lon and others.
TypeScript
Last 12 weeks · 2 commits
Summary add a prop to Vue (default for backwards-compat) to let consumers opt out of trigger refocus on close thread the option through outside-click and restoration paths keep existing behavior unchanged by default Why Vue currently always restores focus to the trigger on close. Some input-driven popover UIs need to close without refocusing the input trigger. Closes #3849 Tests add coverage for when closing via add coverage for outside-click close when add coverage for input trigger + outside-click with
What package within Headless UI are you using? @headlessui/vue What version of that package are you using? v1.7.23 What browser are you using? Chrome and Firefox Reproduction URL https://github.com/ignatremizov/headlessui-vue-popover-restore-focus-repro Describe your issue** I need this UX pattern: Clicking a text input opens a Popover stays open while typing in the input Clicking inside popover should not force-close Clicking outside should close popover and keep input unfocused Current behavior restores focus to the popover trigger/input after close (especially on outside click), and there is no supported opt-out for Popover in Vue. In more complex UI flows this causes focus ping-pong () and visible flicker when trying to keep focus away from the input after outside close. The minimal repro above demonstrates that outside click closes popover and then focus returns to the input. Would you consider adding a supported Popover option to disable restore-focus (for example semantics), or an equivalent close API option (e.g. ) in Vue? Possibly related threads: https://github.com/tailwindlabs/headlessui/issues/3002 https://github.com/tailwindlabs/headlessui/issues/3611 https://github.com/tailwindlabs/headlessui/issues/1839 https://github.com/tailwindlabs/headlessui/issues/2186 https://github.com/tailwindlabs/headlessui/issues/3686 https://github.com/tailwindlabs/headlessui/pull/3687
Discussed in https://github.com/tailwindlabs/headlessui/discussions/1700 Originally posted by oliverkan July 21, 2022 Hi, I am trying to find a way to make dialog persistent on screen. I mean I need to disable the closing feature of dialog when the user clicks somewhere outside of the dialog. I tried the prop but it didn't help. I read the solution alternatives in this discussion. They mention about a tailwind class for pointer events but in new version Dialog.Overlay is deprecated. And also I don't want to loose key functionality if I have an empty function. Is there any new, better way to solve this problem or should I have an empty onClose function and implement keydown event listener? Thanks and regards.
What package within Headless UI are you using? @headlessui/vue What version of that package are you using? v1.7.23 What browser are you using? Chrome Describe your issue I'm using two dropdown Menu on my site header with an svg in the MenuButton and they don't close correctly on touch event on mobile. On click event it work fine. Using text instead of an svg image work fine too. Idk if it is a similar bug like this old one (for React): https://github.com/tailwindlabs/headlessui/issues/2986 I uploaded a video to show the issue. https://github.com/user-attachments/assets/e9e80d6c-7dfb-4469-be40-2d2c8bba5e0a