Repository navigation
feat: dynamic radius — numeric token scale, multiplier & radiusScale config - #686
Merged
Merged
Conversation
…config (#669) Implements the radius token system from issue #669: ## Token Rename (semantic → numeric scale) - --radius-inner (0px) → --radius-0 - --radius-content (4px) → --radius-1 - --radius-element (8px) → --radius-2 - --radius-container (12px)→ --radius-3 - --radius-page (20px) → --radius-4 (16px) - --radius-rounded (9999px)→ --radius-rounded (unchanged) Base unit: 4dp. Tokens 1-4 = base × step × multiplier. Tokens 0 and rounded are fixed (unaffected by multiplier). ## radiusScale on defineTheme New config option following the typeScale pattern: defineTheme({ radiusScale: { base: 4, multiplier: 1 } }) - Generates all 6 radius tokens from base + multiplier - Explicit token overrides take precedence - multiplier: 0 → sharp, 1 → default, 1.5 → rounded, 2 → pill-like ## Theme updates - Default: base=4, multiplier=1 (0/4/8/12/16/9999px) - Neutral: explicit token overrides (values don't follow clean scale) - Brutalist: radiusScale { base: 4, multiplier: 0 } + --radius-rounded: 0px ## Skeleton backwards compat radius prop accepts both old semantic names and new numeric names. Vibe tested: A/B comparison showed numeric naming handles deep nesting better (5 hierarchy levels vs 3) while maintaining 100% LLM success rate. Co-authored-by: Navi <[email protected]>
Contributor
PR Analysis Report📚 Storybook PreviewView Storybook for this PR 🧪 Sandbox PreviewView Sandbox for this PR Modified ComponentsAppShell · View in Storybook
Banner · View in Storybook
Button · View in Storybook
Card · View in Storybook
CheckboxInput · View in Storybook
DateInput · View in Storybook
Dialog · View in Storybook
DropdownMenu · View in Storybook
Field · View in Storybook
HoverCard · View in Storybook
Kbd · View in Storybook
List · View in Storybook
MoreMenu · View in Storybook
NavItem
Popover · View in Storybook
PowerSearch · View in Storybook
Selector · View in Storybook
SideNav · View in Storybook
Skeleton · View in Storybook
TabList · View in Storybook
TimeInput · View in Storybook
Token · View in Storybook
Tooltip · View in Storybook
TopNav · View in Storybook
TreeList · View in Storybook
Typeahead · View in Storybook
Bundle Size Summary
Accessibility AuditStatus: 5 accessibility violation(s) found — 1 critical, 3 serious, 1 moderate. XDSBanner - 1 issue(s)
XDSList - 1 issue(s)
XDSSideNav - 1 issue(s)
XDSTabList - 1 issue(s)
XDSToken - 1 issue(s)
Generated by PR Enrichment workflow | Storybook | Sandbox | View full report |
This was referenced Mar 18, 2026
cixzhang
added a commit
that referenced
this pull request
Apr 26, 2026
…config (#669) (#686) Implements the radius token system from issue #669: ## Token Rename (semantic → numeric scale) - --radius-inner (0px) → --radius-0 - --radius-content (4px) → --radius-1 - --radius-element (8px) → --radius-2 - --radius-container (12px)→ --radius-3 - --radius-page (20px) → --radius-4 (16px) - --radius-rounded (9999px)→ --radius-rounded (unchanged) Base unit: 4dp. Tokens 1-4 = base × step × multiplier. Tokens 0 and rounded are fixed (unaffected by multiplier). ## radiusScale on defineTheme New config option following the typeScale pattern: defineTheme({ radiusScale: { base: 4, multiplier: 1 } }) - Generates all 6 radius tokens from base + multiplier - Explicit token overrides take precedence - multiplier: 0 → sharp, 1 → default, 1.5 → rounded, 2 → pill-like ## Theme updates - Default: base=4, multiplier=1 (0/4/8/12/16/9999px) - Neutral: explicit token overrides (values don't follow clean scale) - Brutalist: radiusScale { base: 4, multiplier: 0 } + --radius-rounded: 0px ## Skeleton backwards compat radius prop accepts both old semantic names and new numeric names. Vibe tested: A/B comparison showed numeric naming handles deep nesting better (5 hierarchy levels vs 3) while maintaining 100% LLM success rate. Co-authored-by: Navi <[email protected]>
This was referenced Apr 29, 2026
cixzhang
added a commit
that referenced
this pull request
Jun 21, 2026
…config (#669) (#686) Implements the radius token system from issue #669: ## Token Rename (semantic → numeric scale) - --radius-inner (0px) → --radius-0 - --radius-content (4px) → --radius-1 - --radius-element (8px) → --radius-2 - --radius-container (12px)→ --radius-3 - --radius-page (20px) → --radius-4 (16px) - --radius-rounded (9999px)→ --radius-rounded (unchanged) Base unit: 4dp. Tokens 1-4 = base × step × multiplier. Tokens 0 and rounded are fixed (unaffected by multiplier). ## radiusScale on defineTheme New config option following the typeScale pattern: defineTheme({ radiusScale: { base: 4, multiplier: 1 } }) - Generates all 6 radius tokens from base + multiplier - Explicit token overrides take precedence - multiplier: 0 → sharp, 1 → default, 1.5 → rounded, 2 → pill-like ## Theme updates - Default: base=4, multiplier=1 (0/4/8/12/16/9999px) - Neutral: explicit token overrides (values don't follow clean scale) - Brutalist: radiusScale { base: 4, multiplier: 0 } + --radius-rounded: 0px ## Skeleton backwards compat radius prop accepts both old semantic names and new numeric names. Vibe tested: A/B comparison showed numeric naming handles deep nesting better (5 hierarchy levels vs 3) while maintaining 100% LLM success rate. Co-authored-by: Navi <[email protected]>
cixzhang
added a commit
that referenced
this pull request
Jun 21, 2026
…config (#669) (#686) Implements the radius token system from issue #669: ## Token Rename (semantic → numeric scale) - --radius-inner (0px) → --radius-0 - --radius-content (4px) → --radius-1 - --radius-element (8px) → --radius-2 - --radius-container (12px)→ --radius-3 - --radius-page (20px) → --radius-4 (16px) - --radius-rounded (9999px)→ --radius-rounded (unchanged) Base unit: 4dp. Tokens 1-4 = base × step × multiplier. Tokens 0 and rounded are fixed (unaffected by multiplier). ## radiusScale on defineTheme New config option following the typeScale pattern: defineTheme({ radiusScale: { base: 4, multiplier: 1 } }) - Generates all 6 radius tokens from base + multiplier - Explicit token overrides take precedence - multiplier: 0 → sharp, 1 → default, 1.5 → rounded, 2 → pill-like ## Theme updates - Default: base=4, multiplier=1 (0/4/8/12/16/9999px) - Neutral: explicit token overrides (values don't follow clean scale) - Brutalist: radiusScale { base: 4, multiplier: 0 } + --radius-rounded: 0px ## Skeleton backwards compat radius prop accepts both old semantic names and new numeric names. Vibe tested: A/B comparison showed numeric naming handles deep nesting better (5 hierarchy levels vs 3) while maintaining 100% LLM success rate.
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
Implements the dynamic radius system from #669.
Token Rename (semantic → numeric scale)
--radius-inner--radius-0--radius-content--radius-1--radius-element--radius-2--radius-container--radius-3--radius-page--radius-4--radius-rounded--radius-roundedBase unit: 4dp. Tokens 1–4 =
base × step × multiplier. Tokens 0 and rounded are fixed.radiusScaleondefineThemeNew config option following the
typeScalepattern:base + multipliertokensoverrides take precedence over radiusScale valuesmultiplier: 0→ sharp,1→ default,1.5→ rounded,2→ pill-likeTheme Updates
base: 4, multiplier: 1radiusScale: { base: 4, multiplier: 0 }+--radius-rounded: 0pxSkeleton Backwards Compat
The
radiusprop onXDSSkeletonaccepts both old semantic names and new numeric names for backwards compatibility.Vibe Test Results
A/B tested semantic vs numeric naming with 12 radius-focused prompts (results):
New Files
packages/core/src/theme/expandRadiusScale.ts— radius scale expansion utilitypackages/core/src/theme/expandRadiusScale.test.ts— tests (6 cases)internal/vibe-tests/test-sets/radius-tokens.json— radius-focused vibe test promptsinternal/vibe-tests/prompts/radius-evaluator.md— radius-specific evaluatorFiles Changed
61 files — bulk of changes are mechanical token renames across ~40 component files.
Closes #669