Skip to content

feat(themes): add semantic control radius tokens#577

Closed
aralston wants to merge 1 commit intoreshaped-ui:mainfrom
aralston:feat/control-radius-tokens
Closed

feat(themes): add semantic control radius tokens#577
aralston wants to merge 1 commit intoreshaped-ui:mainfrom
aralston:feat/control-radius-tokens

Conversation

@aralston
Copy link

Summary

  • Adds control-small, control-medium, control-large, and control-xlarge radius tokens
  • Allows theme authors to customize border-radius for interactive controls independently from general radius values
  • Components updated: Button, TextField, TextArea, Select, MenuItem

Problem

Currently, components like Button have hardcoded size-to-radius mappings (e.g., small buttons always use --rs-radius-small). Theme authors cannot customize how "rounded" interactive controls appear without affecting non-control elements that use the same base radius tokens.

Solution

Introduce semantic control-* radius tokens that default to referencing existing radius tokens but can be overridden by theme authors:

"radius": {
  "control-small": { "radiusToken": "small" },
  "control-medium": { "radiusToken": "small" },
  "control-large": { "radiusToken": "medium" },
  "control-xlarge": { "radiusToken": "medium" }
}

Test plan

  • Build passes (pnpm build)
  • Unit tests pass (pnpm test:unit)
  • Visual inspection in Storybook for affected components
  • Verify theme customization works by overriding control tokens

🤖 Generated with Claude Code

Adds control-small, control-medium, control-large, and control-xlarge
radius tokens that allow theme authors to customize border-radius
for interactive controls independently from general radius values.

Components updated: Button, TextField, TextArea, Select, MenuItem

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@blvdmitry
Copy link
Contributor

Can you tell me more about your use case? In general the principles behind the current theming system is to keep tokens very low level and not be component specific. It definitely makes the component less flexible but also makes themes easier to use for anyone building custom components not having to think what a "control" is

@aralston aralston closed this Feb 2, 2026
@aralston aralston deleted the feat/control-radius-tokens branch February 2, 2026 02:12
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.

2 participants