VanillaReactLight & dark377 views
An elegant, precision-engineered settings panel with sweep-fill switches, spring-glide thumbs, live status, native button behavior, and contrast-safe design-system adaptation in light and dark themes.
Switch component
An elegant, precision-engineered settings panel with sweep-fill switches, spring-glide thumbs, live status, native button behavior, and contrast-safe design-system adaptation in light and dark themes.
calc() from track, border, and thumb sizes, so the thumb is perfectly centered with identical 4px gaps in both the off and on positionstransform: scaleX (GPU-friendly, transform-only)transform: translateX with an overshoot cubic-bezier, plus a transform-only press squasharia-live="polite"role="switch" semantics with aria-checked synced on every change:focus-within highlighting for a cohesive settings-card feelprefers-reduced-motion<button> with role="switch" and aria-checked<label for> forwards clicks; aria-labelledby and aria-describedby expose label and supporting textaria-live="polite" chip announces "n of m on" after every change<button> behavior handles Space and Enter exactly once:focus-visible outline (primary-tinted) plus row :focus-within highlightprefers-reduced-motion: reduce disables all animationsOpen Switch in Atheros AI Builder, pick a design system and ask the AI assistant to change the layout, copy or behaviour — the switch is regenerated against your tokens. Take the HTML, CSS, JS and React source with you, or pull it into your repo from Claude Code, Cursor or Codex over MCP.
300+ production-ready components and Atheros AI models. Every paid plan includes access to the whole Atheros — AI Builder and Learning.
Starting at $9.9 per month, billed annually