Get Started
Learn what Zag is and why state machines make better UI components.
Installation
Install Zag and connect it to your framework in minutes.
Components
Browse 50+ production-ready component machines.
Build Your Own
Create custom state machine components for your design system.
Why Zag?
Framework Agnostic
One codebase for React, Vue, Solid, Svelte, and Preact via lightweight adapters.
Accessible by Default
Every component follows WAI-ARIA authoring practices — keyboard, focus, and ARIA handled automatically.
Headless
Zero styles. Bring your own CSS, Tailwind, CSS Modules, or any styling solution.
State Machine Powered
Built on statecharts — predictable, testable, and easy to reason about.
TypeScript First
Fully typed APIs with schema-based type inference throughout.
Incremental Adoption
Each component is a separate npm package — install only what you need.
Quick start
Install a component machine
Install the machine for the component you want to use, plus the adapter for your framework.
Use the machine in your component
Call
useMachine to start the state machine, then connect to get prop getters for your elements.Explore components
Form inputs
Checkbox, Switch, Radio Group, Number Input, Tags Input, Editable, Pin Input, Slider
Overlays
Dialog, Popover, Tooltip, Hover Card, Menu, Combobox, Select
Navigation
Tabs, Accordion, Pagination, Steps, Tree View, Navigation Menu
Date & Time
Date Picker, Timer, Carousel, Progress, Tour