Skip to content

v6: Add SegmentedControl primitive#4282

Merged
trevor-scheer merged 1 commit into
graphiql-6from
trevor/segmented-control
May 15, 2026
Merged

v6: Add SegmentedControl primitive#4282
trevor-scheer merged 1 commit into
graphiql-6from
trevor/segmented-control

Conversation

@trevor-scheer
Copy link
Copy Markdown
Contributor

@trevor-scheer trevor-scheer commented May 15, 2026

Summary

  • New primitive SegmentedControl<T extends string>.
  • Props: value, onChange, options, optional ariaLabel. Each option supports an icon and disabled flag.
  • Storybook stories: ResponseView and Density.

Test plan

  • Open Primitives/SegmentedControl; click between options to confirm selection updates.
  • aria-pressed reflects the active option (check DOM or screen reader).
  • Disabled options don't fire onChange.

Refs: #4219

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 15, 2026

🦋 Changeset detected

Latest commit: c5df74f

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Copy Markdown
Contributor

The latest changes of this PR are not available as canary, since there are no linked changesets for this PR.

Button group for picking one of N options inline. Each option supports an icon and a `disabled` flag. Pass `ariaLabel` to label the group.
@trevor-scheer trevor-scheer force-pushed the trevor/segmented-control branch from 754476e to c5df74f Compare May 15, 2026 15:32
@trevor-scheer trevor-scheer marked this pull request as ready for review May 15, 2026 19:24
@trevor-scheer trevor-scheer merged commit a0fe11a into graphiql-6 May 15, 2026
13 checks passed
@trevor-scheer trevor-scheer deleted the trevor/segmented-control branch May 15, 2026 19:24
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.

1 participant