Skip to content

Alpine Headless UIAccessible UI Primitives for Alpine.js

Unstyled, behavior-only components with correct state management, keyboard interactions, and ARIA attributes

Quick Example

html
<div x-collapsible>
  <button x-collapsible:trigger type="button">
    Toggle Content
  </button>

  <div x-collapsible:content>
    <p>This content can be collapsed and expanded.</p>
  </div>
</div>

Philosophy

Alpine Headless UI provides the behavior and accessibility, while you provide the HTML structure and styling. Each component handles:

  • ✅ State management
  • ✅ Keyboard interactions
  • ✅ ARIA attributes
  • ✅ Focus management
  • ✅ Event dispatching

You control:

  • 🎨 HTML markup
  • 🎨 CSS styling
  • 🎨 Animations and transitions
  • 🎨 Layout and spacing

Inspiration

This library is inspired by:

Built with Alpine.js and inspired by Zag.js