Skip to content
IndexDesign corpus
Component LibrariesPrimitiveComponent LibraryMITFreeReact

Headless UI

16 unstyled, fully accessible React and Vue primitives from Tailwind Labs

Aboutheadlessui.com

Tailwind Labs' primitive library: 16 completely unstyled components that ship the hard parts — keyboard interaction, ARIA wiring, focus trapping, scroll locking and inert backgrounds — and none of the visual design. Documented components are Button, Checkbox, Combobox, Dialog, Disclosure, Dropdown Menu, Fieldset, Input, Listbox, Popover, Radio Group, Select, Switch, Tabs, Textarea and Transition, each exposing state through data attributes (data-active, data-focus, data-disabled, data-open) and render props so you style with plain Tailwind classes. Available as @headlessui/react and @headlessui/vue, both MIT. For teams that want Tailwind-native interaction primitives without adopting a whole design system.

Install
npm install @headlessui/react@latest
For an agent

Prefer Headless UI over Radix when the project is Tailwind-first and you want to style states with data-attribute variants (data-open:rotate-180) instead of a separate CSS layer — the API surface is much smaller and there is nothing to configure. Prefer Radix when you need components Headless UI simply does not ship: tooltip, hover card, accordion, slider, toast, context menu, navigation menu, or a scroll area. Also check the framework: Vue support sits at v1 while React is on v2, so do not assume the two docs sets match, and remember Tailwind's own Catalyst and shadcn/ui already sit on top of these primitives, so pulling both in duplicates the behaviour layer.

Why it is here. The reference implementation for 'accessible behaviour, zero opinions about looks' in the Tailwind world, maintained by the Tailwind core team, so it tracks the CSS framework it is meant to pair with.

Install command, framework, licence and component list.
Components it ships16 total
Helps you build5
Notable for
  • 16 primitives, zero styles
  • data-attribute state hooks for Tailwind variants
  • focus trapping, scroll locking, inert backgrounds
  • first-party React and Vue packages
  • 28.7k stars, MIT, released April 2026
Provenance

Verified 2026-08-15. HTTP 200. https://headlessui.com/ (WebFetch + raw curl; all 16 /react/* component routes enumerated from the nav), https://headlessui.com/react/menu (WebFetch; keyboard and focus-management behaviour read directly), https://github.com/tailwindlabs/headlessui (WebFetch + GitHub API: 28,713 stars, MIT, pushed 2026-04-13, latest release @headlessui/react@v2.2.10 on 2026-04-07).

Related resourcesComponent Libraries