Skip to content

Releases: chakra-ui/zag

@zag-js/[email protected]

02 Jan 17:11
f9fe563

Choose a tag to compare

Patch Changes

@zag-js/[email protected]

02 Jan 17:11
f9fe563

Choose a tag to compare

Minor Changes

  • 19975c3 Thanks
    @segunadebayo! - Initial release of the vanilla JavaScript adapter for Zag.js.

    • VanillaMachine - Class-based wrapper for zag machines with start/stop lifecycle
    • normalizeProps - Converts React-style props to vanilla DOM attributes
    • spreadProps - Spreads props onto DOM elements with event listener management
    import { VanillaMachine, normalizeProps, spreadProps } from "@zag-js/vanilla"
    import * as toggle from "@zag-js/toggle"
    
    const machine = new VanillaMachine(toggle.machine, { id: "toggle" })
    machine.start()
    
    const api = toggle.connect(machine.service, normalizeProps)
    spreadProps(buttonEl, api.buttonProps)
    
    machine.stop()

Patch Changes

@zag-js/[email protected]

02 Jan 17:12
f9fe563

Choose a tag to compare

@zag-js/[email protected]

02 Jan 17:13
f9fe563

Choose a tag to compare

@zag-js/[email protected]

02 Jan 17:13
f9fe563

Choose a tag to compare

Patch Changes

@zag-js/[email protected]

02 Jan 17:13
f9fe563

Choose a tag to compare

Patch Changes

@zag-js/[email protected]

02 Jan 17:13
f9fe563

Choose a tag to compare

Patch Changes

@zag-js/[email protected]

02 Jan 17:13
f9fe563

Choose a tag to compare

Patch Changes

@zag-js/[email protected]

02 Jan 17:13
f9fe563

Choose a tag to compare

Patch Changes

@zag-js/[email protected]

02 Jan 17:13
f9fe563

Choose a tag to compare

Patch Changes