Skip to content

feat(shared): redesign Toggle/Switch per Figma design system#6117

Open
tsahimatsliah wants to merge 1 commit into
mainfrom
feat/toggle-redesign
Open

feat(shared): redesign Toggle/Switch per Figma design system#6117
tsahimatsliah wants to merge 1 commit into
mainfrom
feat/toggle-redesign

Conversation

@tsahimatsliah
Copy link
Copy Markdown
Member

@tsahimatsliah tsahimatsliah commented May 31, 2026

Summary

  • Redesign the shared Switch to match the new Figma design system spec (node 796-69): a 44×24 rounded-8 track with a rounded-6 knob, surface-float (off) / cabbage-tinted (on) backgrounds, a surface-focus keyboard focus ring, and a hover/press surface layer.
  • New press micro-interaction: on :active the knob squeezes to 60% and slides to the track centre, then snaps to the destination side on release.
  • Theme-aware via semantic tokens (surface-*, accent-cabbage-*, text-*) so light/dark both work; the public API (inputId, name, checked, onToggle, compact, defaultTypo, etc.) is unchanged. compact now maps to label size (footnote vs callout) to match the Figma small/medium text sizes.
  • Adds a dedicated Storybook review page at Components/Fields/Switch comparing the previous and new designs side by side across every state. All toggles are live so reviewers can verify hover, focus (Tab), press, and toggling, in both themes.

Test plan

  • Components/Fields/Switch › Comparison — review previous vs new for On/Off, no-label, disabled, and medium-label states in light & dark.
  • Hover a toggle → surface layer + knob lift; Tab to focus → focus ring; click & hold → knob squeezes to centre.
  • Spot-check existing consumers (settings, notifications, modals) for layout with the slightly larger 44×24 toggle.

Made with Cursor

Preview domain

https://feat-toggle-redesign.preview.app.daily.dev

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>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 31, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
daily-webapp Ready Ready Preview May 31, 2026 10:40am
storybook Error Error May 31, 2026 10:40am

Request Review

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.

1 participant