Build your design system in React, Solid, Vue or Svelte. Powered by finite state machines
Zag is a JavaScript API that implements common component patterns using the state machine methodology. It focuses on accessibility, providing adapters for JS frameworks like React, Solid, or Vue. Zag is built on top of the latest ideas in Statecharts, giving developers the control to use any styling solution they prefer. With Zag, developers can avoid the endless re-implementation of common component patterns in multiple frameworks and benefit from lightweight, simple, and easy-to-understand machines.
To install Zag, follow these steps:
Install the desired component machine using npm: npm install {component}
npm install @zag-js/dialog
If you are using a framework-specific solution, install the corresponding wrapper package:
npm install @zag-js/react
npm install @zag-js/vue
npm install @zag-js/solid
Zag is a JavaScript API that aims to simplify the implementation of common component patterns in multiple frameworks. By leveraging state machine methodology, Zag provides a framework-agnostic solution that focuses on accessibility and gives developers the flexibility to use any styling solution they prefer. With lightweight and easy-to-understand machines, Zag allows developers to build complex components quickly and efficiently.