Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@zag-js/accordion

chakra-ui745.6kMIT1.1.0TypeScript support: included

Core logic for the accordion widget implemented as a state machine

js, machine, xstate, statechart, component, chakra-ui, accordion

readme

@zag-js/accordion

Core logic for the accordion widget implemented as a state machine

Installation

yarn add @zag-js/accordion
# or
npm i @zag-js/accordion

Contribution

Yes please! See the contributing guidelines for details.

Licence

This project is licensed under the terms of the MIT license.

changelog

CHANGELOG

All notable changes to this project will be documented in this file.

For v0.x changelog, see the v0 branch

[Unreleased]

See the Changesets for the latest changes.

1.1.0 - 2025-02-26

Fixed

  • Pin Input: Fix issue where editing existing values don't work as expected.

  • Number Input: Fix issue where value prop wasn't consumed in the machine.

  • Carousel: Fix issue where page was not consumed in the machine.

  • Textarea: Fix issue where ResizeObserver loop could throw undelivered notifications warning.

Added

  • Toggle: Bring back toggle machine.

  • Hover Card: Expose interaction outside handlers to hover card.

1.0.2 - 2025-02-24

Fixed

  • Collection: Widen items type to allow Iterable instead of just Array since we internally convert iterables to an array.

  • Carousel: Enforce required slideCount to ensure machine works as expected.

  • Framework Bindings: Fix issue where undefined values were not filtered out before resolving props.

  • React: Fix issue where flushSync warnings could be shown when unmounting a component.

1.0.1 - 2025-02-23

Fixed

  • Select: Fix regression where multiple: true doesn't work.

  • Timer: Fix issue where timer doesn't restart when startMs changes.

  • Toggle Group: Fix issue where data-focus doesn't get removed after blurring the toggle group.

  • Toast: Fix keyboard navigation issue where toast group skips the close button within the toast item and moves to the next focusable element in the document.

Added

  • Added <component>.Machine type to help when typecasting generic components like combobox and select.

1.0.0 - 2025-02-22

Changed

  • Core: Rewrite machines for increased performance and initial mount time. The results show roughly 1.5x - 4x performance improvements across components.

  • [Breaking] Toast

    • Require the creation of a toast store using createStore
    • Solid.js: Require the usage of <Key> component to render toasts

Fixed

  • Menu: Fix issue where context menu doesn't update positioning on subsequent right clicks.

  • Avatar: Fix issue where api.setSrc doesn't work.

  • File Upload: Fix issue where drag-and-drop doesn't work when directory is true.

  • Carousel

    • Fix issue where initial page is not working.
    • Fix issue where pagination sync broken after using dots indicators.
  • Timer: Fix issue where timer stops when switching tabs.