0.82.0 - Add SplitButton component - #90
Merged
Merged
Conversation
…actions dropdown) with variants, sizes, and a Storybook story.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Introduces a new
SplitButtoncomponent that combines a primary action button with a dropdown menu of related secondary actions. This follows the split button UI pattern commonly used for operations like "Save" with options like "Save as draft" or "Deploy" with environment variants.Changes
New component:
SplitButtonwith composable sub-componentsSplitButton- Root container managing dropdown state and contextSplitButtonAction- Primary action button (left side)SplitButtonTrigger- Dropdown trigger button with chevron icon (right side)SplitButtonContent- Dropdown menu content wrapperVariant support: Mirrors Button variants (default, destructive, outline, secondary, ghost)
Size support: Matches Button sizes (sm, default, lg) with appropriately scaled chevron icons
Accessibility:
aria-label(defaults to "Show more actions")aria-haspopup="menu"on triggerStyling details:
Comprehensive Storybook stories demonstrating:
Package exports: Added to main
src/components/ui/index.tsfor public APIVersion bump: 0.80.0 → 0.81.0
https://claude.ai/code/session_01VYAiy4xGQG2Jd1a713EHBK