feat(button): rework the button-family API#239
Merged
Conversation
Merge prominence + tone into a single variant axis (primary / secondary / tertiary / ghost / danger / danger-outline), rename magnitude to size and sizing to fillType, replace startIcon/endIcon with a single icon prop plus iconPosition (start default; the loading spinner takes the same slot), and add explicit disabled and type (button default) props. Applies across the whole button family: Button, IconButton, SplitButton, ButtonGroup, and AnchorButton — elements and components tiers, stories, patterns, docs-site demos and pages, and the integration guide.
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
propel-docs | f915ed4 | Jul 24 2026, 04:11 PM |
Avatar tones are now always auto-derived (the tone prop and AVATAR_TONES export were removed in #224), and BreadcrumbLink/BreadcrumbPage take a label prop instead of children. Unbreaks docs check:types (22 errors) and the three red CI checks.
|
📚 Storybook preview: https://pr-239-propel-storybook.vamsi-906.workers.dev |
vihar
approved these changes
Jul 24, 2026
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.
What
Reworks the API of the whole button family —
Button,IconButton,SplitButton,ButtonGroup/ButtonGroupButton, andAnchorButton(elements + components tiers):prominence+tone→ onevariantaxis:primary/secondary/tertiary/ghost/danger/danger-outline(danger was only ever definable as filled-primary and outlined-secondary, so they are now first-class variants; impossible pairs are unrepresentable)magnitude→size(values unchanged:sm/md/lg/xl)sizing→fillType(values unchanged:hug/fill; Button only)startIcon/endIcon→ singleiconprop +iconPosition("start"default,"end"to trail). Theloadingspinner now takes the icon slot at the same position.disabledprop (hard, non-focusable native disabled — previously only leaked through prop spreading;loadingstays the soft-disabled focusable state)typeprop:"button"(default) /"submit"/"reset"renderis untouched, and all styling values are 1:1 — every variant maps to the exact class set it had before (disabled/aria palettes included).Breaking change
This is a breaking API change; a
minorchangeset is included. Internals renamed accordingly:control-chrome.tsis a single flatvariantcva axis (ControlChromePair/controlChromePair()removed),button-geometry.tsandlink-chrome.tsaxes renamed, and public types are nowButtonVariant/ButtonSize/ButtonFillType(same pattern for the other four components).Sweep covers: all family stories, every consuming story in the package,
patterns/, the docs site (~80 demos + component pages; button demos renamedprominences/tones/magnitudes→variants/sizes), anddocs/integration.mdexamples.Verification
pnpm fix(oxfmt + oxlint): cleanpnpm check: clean, exceptapps/docscheck:types, whose 22 errors are all inavatar/avatar-group/breadcrumb/workspace-avatardemos and reproduce identically onmain(verified by stashing + rebuilding) — pre-existing, introduced by [WEB-8148] fix(avatar): stable per-initials tones, workspace icon fallback, and image-failure coverage #224pnpm test(propel): 848/848 pass (one a11y flake in a Select story — a known popup-close/axe timing race — passes on retry and in the final full run)