Skip to content

feat(shared): Toggle color exploration — brand track + contrasting knob#6124

Closed
tsahimatsliah wants to merge 11 commits into
feat/toggle-redesignfrom
feat/toggle-redesign-colors
Closed

feat(shared): Toggle color exploration — brand track + contrasting knob#6124
tsahimatsliah wants to merge 11 commits into
feat/toggle-redesignfrom
feat/toggle-redesign-colors

Conversation

@tsahimatsliah
Copy link
Copy Markdown
Member

@tsahimatsliah tsahimatsliah commented Jun 1, 2026

Summary

Color-only exploration on top of the Toggle Redesign PR (#6117). The mechanics, sizing, and animations are untouched — this just flips the checked palette so we can compare which reads better.

Before (on #6117): transparent/faint cabbage-tinted track + a solid cabbage knob (the "square" carries the brand color).

After (this PR): iOS/Chrome model —

  • Track fills with the solid brand color (--theme-accent-cabbage-default).
  • Knob flips to a theme-aware contrasting surface (--theme-surface-invert): near-black in light theme, white in dark theme — the opposite of the brand fill, for maximum contrast.

Off state is unchanged.

Test plan

  • Components/Fields/Switch in Storybook — toggle On/Off in both light & dark and compare the new branded track + contrasting knob against the previous look.
  • Confirm hover/focus/press micro-interactions still feel right over the solid track.

Base branch is feat/toggle-redesign so the diff isolates only the color change.

Made with Cursor

Preview domain

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

Flip the checked Switch palette to an iOS/Chrome-style design: the track
fills with the solid brand color (cabbage) and the knob switches to a
theme-aware contrasting surface (near-black in light, white in dark) for
maximum contrast.

Co-authored-by: Cursor <cursoragent@cursor.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 1, 2026

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

Project Deployment Actions Updated (UTC)
daily-webapp Ready Ready Preview Jun 1, 2026 9:33am
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
storybook Ignored Ignored Jun 1, 2026 9:33am

Request Review

Use the contrasting surface-invert knob in every state so only the track
color changes between off (neutral) and on (brand), matching iOS/Chrome.

Co-authored-by: Cursor <cursoragent@cursor.com>
tsahimatsliah and others added 2 commits June 1, 2026 10:43
Keep the white knob in light mode, but on dark mode swap the dark knob for
a light brand tint (cabbage 10) so it reads as a lighter brand color rather
than the primary dark surface.

Co-authored-by: Cursor <cursoragent@cursor.com>
Use surface-disabled instead of the faint surface-float for the disabled
off track so the toggle stays legible; knob color is unchanged.

Co-authored-by: Cursor <cursoragent@cursor.com>
Keep the knob white (salt.0) in light and dark instead of a theme tint, and
raise the off track from surface-float to surface-active so it reads clearly.

Co-authored-by: Cursor <cursoragent@cursor.com>
On dark theme use salt 20 instead of pure white so the knob is a touch
softer; light theme keeps pure white.

Co-authored-by: Cursor <cursoragent@cursor.com>
Click-and-hold the switch and drag it left/right to slide the knob (iOS/macOS
style); it follows the cursor at the squeezed scale and snaps to the nearest
side on release. Keeps the existing press squeeze and snap transition, and
preserves keyboard/tap toggling.

Co-authored-by: Cursor <cursoragent@cursor.com>
Bump the dark-theme knob from salt 20 to salt 30 for a slightly darker
off-white; light theme stays pure white.

Co-authored-by: Cursor <cursoragent@cursor.com>
The salt ramp is all near-whites so salt 20/30 was imperceptible. Use the
visible light brand tint (cabbage 10) for the dark-theme knob; light theme
keeps pure white.

Co-authored-by: Cursor <cursoragent@cursor.com>
Make the knob color overridable via the --switch-knob custom property
(defaults unchanged) and add a dark-mode story comparing white, salt 10/20/30,
and cabbage 10 knobs on the brand track to pick the final color.

Co-authored-by: Cursor <cursoragent@cursor.com>
Settle on a solid primary-white knob for light and dark, off and on. Remove
the temporary --switch-knob override and the knob-color comparison story.

Co-authored-by: Cursor <cursoragent@cursor.com>
@tsahimatsliah
Copy link
Copy Markdown
Member Author

Folded the final toggle work (brand-filled track + solid white knob, off/disabled track visibility, kept press/snap transitions, and the draggable iOS/macOS-style knob) into the main redesign PR #6117 as a single clean commit. Closing this exploration PR.

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