📖 Step 5: Design - Advanced UI/UX#134 / 291

Toggle

Toggle

📖One-line summary

A switch UI that flips between on and off.

Example

Click the toggle

OFF
Notifications are off

Vibe coding prompt examples

>_

Build a toggle switch for dark mode. Make the transition animation smooth and swap between sun and moon icons.

>_

Build a notifications on/off toggle in the settings screen. Save the toggle state to the server immediately and show a loading indicator while saving.

Try these prompts in your AI coding assistant!