github chakra-ui/zag @zag-js/select@2.0.0-next.1

latest releases: @zag-js/stringify-state@2.0.0-next.1, @zag-js/tags-input@2.0.0-next.1, @zag-js/file-utils@2.0.0-next.1...
pre-release6 hours ago

Minor Changes

  • #3167
    d2b9972 Thanks
    @github-actions! - Add get<Part>State() getters (e.g. getTriggerState,
    getContentState, getRootState), extending the existing getItemState convention to every part with derived state.

    const triggerState = dialog.getTriggerState({ value: "confirm" })
    // { value: "confirm", current: true, open: true }

Patch Changes

  • #3167
    037af89 Thanks
    @github-actions! - Move layer stack styles and attributes into machine
    connect props so framework renders cannot overwrite them.

    Breaking: trackDismissableElement now requires onLayerChange. Apply the emitted snapshot's layer index,
    nesting metadata, and pointer blocking state to the registered element through your framework's render output.

  • #3167
    8148d4d Thanks
    @github-actions! - Fix positioner appearing in the top-left corner on first
    open (most visible in the Svelte adapter). The positioner now stays hidden off-screen via a CSS variable fallback in
    transform instead of a positioned-gated opacity. This keeps the framework-managed style static, so reactive
    re-renders no longer clobber the --x/--y variables popper sets.

    As a result, the internal positioned context flag is removed from positioned machines (popover, menu, select, etc.).

    Also fixes cascade-select positioning: it now sets the initial placement before measuring and defers the first
    placement computation (matching the other components), so it positions correctly on open — including defaultOpen.

  • ffbd5b5 Thanks
    @segunadebayo! - Fixed issue where the selected item was not scrolled into view
    when the content falls back to standard positioning (alignItemWithTrigger enabled but not enough space to align).

    • The list only becomes scrollable once the positioner applies its max-height, which lands a frame or two after the
      content mounts. The initial scroll ran before that and was silently dropped, leaving the list at the top with the
      selected item out of view.
  • Updated dependencies [1b6233d,
    037af89,
    8148d4d]:

    • @zag-js/collection@2.0.0-next.1
    • @zag-js/dismissable@2.0.0-next.1
    • @zag-js/popper@2.0.0-next.1
    • @zag-js/anatomy@2.0.0-next.1
    • @zag-js/core@2.0.0-next.1
    • @zag-js/types@2.0.0-next.1
    • @zag-js/utils@2.0.0-next.1
    • @zag-js/dom-query@2.0.0-next.1
    • @zag-js/focus-visible@2.0.0-next.1
    • @zag-js/live-region@2.0.0-next.1

Don't miss a new zag release

NewReleases is sending notifications on new releases.