Memorisely

Components

Switch

Immediate on/off for a setting. The change should feel instant , no extra Save if the product persists on toggle. Checked track uses brand switch green (`--switch` / `#2F6E45`) in light and dark.

When to use

  • Preferences that take effect immediately (notifications, calendar sync, visibility).
  • Use Checkbox for forms submitted later, or multi-select lists.
  • Pair with a short label on the left; switch aligns to the trailing edge in settings rows.

Examples

Default

h-7 track , comfortable for settings lists.

Compact

size=sm for dense tables and admin rows.

Disabled

Best practice

Do

  • ✓Label describes the on state (“Allow public sharing”).
  • ✓Respect reduced motion , thumb travel already eases gently.

Don’t

  • ×Ask for a separate Save after every switch in the same panel without a clear reason.
  • ×Use Switch for actions like Delete , use Button.

components/ui/switch.tsx