feat(shared): redesign Toggle/Switch per Figma design system#6117
Open
tsahimatsliah wants to merge 1 commit into
Open
feat(shared): redesign Toggle/Switch per Figma design system#6117tsahimatsliah wants to merge 1 commit into
tsahimatsliah wants to merge 1 commit into
Conversation
Update the shared Switch to the new toggle design: a 44x24 rounded-8 track with a rounded-square knob, surface-float/cabbage tinting, a focus ring, and a press interaction that squeezes the knob toward the track centre. Adds a Storybook page comparing the previous and new designs across every state, animation, and interaction. Co-authored-by: Cursor <cursoragent@cursor.com>
|
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
Switchto match the new Figma design system spec (node 796-69): a 44×24rounded-8track with arounded-6knob,surface-float(off) / cabbage-tinted (on) backgrounds, asurface-focuskeyboard focus ring, and a hover/press surface layer.:activethe knob squeezes to 60% and slides to the track centre, then snaps to the destination side on release.surface-*,accent-cabbage-*,text-*) so light/dark both work; the public API (inputId,name,checked,onToggle,compact,defaultTypo, etc.) is unchanged.compactnow maps to label size (footnote vs callout) to match the Figma small/medium text sizes.Test plan
Components/Fields/Switch › Comparison— review previous vs new for On/Off, no-label, disabled, and medium-label states in light & dark.Made with Cursor
Preview domain
https://feat-toggle-redesign.preview.app.daily.dev