Skip to content

feat(tags input): export type InputValueChangeDetails #3577

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

renchris
Copy link

@renchris renchris commented Aug 6, 2025

Tags Input — export type InputValueChangeDetails

Problem

Ark-UI tags-input exports type ValueChangeDetails but not InputValueChangeDetails, which creates an inconsistency in the API. Both types are available from the underlying @zag-js/tags-input package:

interface ValueChangeDetails {
    value: string[];
}
interface InputValueChangeDetails {
    inputValue: string;
}

Use Case

This export is needed for proper type safety when handling input value changes in current components. ie useTags component needs to handle both value changes and input value changes:

import { useTags, type UseTagsInputProps, type TagsInputValueChangeDetails } from './park-ui/TagsInput'

// Currently missing type for input value changes
const handleInputChange = (details: { inputValue: string }) => {
  // Need proper typing for tags-input input value changes
}

const handleValueChange = (details: TagsInputValueChangeDetails) => {
  // This works fine
}

Changes

  • Added InputValueChangeDetails to the exports in packages/react/src/components/tags-input/tags-input.ts

Why

This type was available from @zag-js/tags-input but not exported, making it unavailable to users of the library who need to properly type their input value change handlers.

Testing

The change is minimal and only adds an export for an existing type that was already available from the underlying package. No breaking changes or new functionality is introduced.

Related

This addresses the inconsistency where ValueChangeDetails is exported but InputValueChangeDetails was not, despite both being available from the same source package.

Copy link

vercel bot commented Aug 6, 2025

@renchris is attempting to deploy a commit to the Chakra UI Team on Vercel.

A member of the Team first needs to authorize it.

@segunadebayo
Copy link
Member

Thanks for this PR @renchris

I've updated this for all frameworks in the main branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants