Skip to content

[ToggleGroup] Better type safety #3142

Closed

Description

@michaelhazan

Feature request

Summary

Currently ToggleGroup's props are filled with any instead of just being generic.
on top of that, the value prop and onValueChange don't depend on if the multiple is true or not causing the component to always expect and array (even if multiple select is not expected).

What i suggest is the behavior to be the same as the way that Combobox component handles the value and multiple props.

Motivation

Feels more consistent with the rest of the library.

Activity

  1. added
    status: waiting for maintainer
    on Nov 5, 2025
  2. added
    type: enhancement
    component: toggle group
    and removed
    status: waiting for maintainer
    on Nov 6, 2025
  3. michaelhazan commented on Nov 6, 2025

    @michaelhazan
    ContributorAuthor

    @mj12albert is it ok if i attempt to take it on?

    realized i had some time later today and would like to do this!

  4. mj12albert commented on Nov 6, 2025

    @mj12albert
    Member

    @mj12albert is it ok if i attempt to take it on?

    realized i had some time later today and would like to do this!

    @michaelhazan Thanks of course ~ please go ahead and make a PR

  5. added
    breaking change
    on Nov 26, 2025
  6. michaelhazan commented on Nov 28, 2025

    @michaelhazan
    ContributorAuthor

    Please note: the result will be slightly different then what the issue originally states: #3173 (comment)

  7. removed
    breaking change
    on Jan 27, 2026
  8. github-actions commented on Feb 9, 2026

    @github-actions

    This fix will be available in the next npm release of Base UI.

    In the meantime, you can try it out on our Canary release channel:

    npm i https://pkg.pr.new/@base-ui/react@3173
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    component: toggle grouptype: enhancementtypescript

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions