feat(Switch): add size prop scale (sm / md) matching boolean control vertical rhythm (#4230)#4322
Draft
HelloOjasMutreja wants to merge 3 commits into
Draft
feat(Switch): add size prop scale (sm / md) matching boolean control vertical rhythm (#4230)#4322HelloOjasMutreja wants to merge 3 commits into
HelloOjasMutreja wants to merge 3 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
github-actions
Bot
requested review from
cvkxx,
ernestt,
kentonquatman and
rubyycheung
July 25, 2026 08:13
Contributor
PR Analysis ReportModified ComponentsSwitch
Bundle Size Summary
Accessibility AuditStatus: No accessibility violations detected. Generated by PR Enrichment workflow | View full report |
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
Closes #4230 (
Switch: add a size prop matching the Checkbox/Radio size scale).This PR adds a
sizeprop ('sm'/'md', default'md') toSwitchmatching the size scale used byCheckboxInputandRadioList:sm: 34px track width, 20px track height, 12px thumb (off) / 16px thumb (on). Matches 20pxsmcheckbox/radio control height.md: 40px track width, 24px track height, 16px thumb (off) / 20px thumb (on). Matches 24pxmdcheckbox/radio control height (default, non-breaking).Commit Breakdown
This PR contains 3 logical commits:
feat(Switch): add size prop scale (sm / md) to match boolean control vertical rhythm (#4230)docs(Switch): document size prop in Switch.doc.mjs (#4230)test(Switch): add size prop unit tests & changeset (#4230)Test Plan
pnpm --filter @astryxdesign/core test Switch.test.tsx(42/42 tests passing).pnpm check:repoto verify repository integrity.