UI Animation
An interactive dark mode toggle animation built in Rive: tap the switch and a glowing blue knob slides between a sun and a moon, while colours, glow and labels shift smoothly from light to dark. It’s a tactile theme switch that makes a simple setting feel satisfying, for apps, dashboards and websites with light and dark themes.
Challenges & Objectives
The visual interface features a clean, oversized switch set against a dark gray background. To the left, muted sans-serif typography reads “Light”. The core interaction happens inside a rounded container holding a sun icon and a moon-and-waves icon. A prominent, rounded blue pill button glows intensely over the selected nighttime icon, producing a vibrant neon aura that indicates an active dark mode state.
Inner Glow and Texture Fidelity: Replicating a convincing internal light source within the moving toggle knob so that the neon blue hue radiates naturally across the container walls without obscuring the white vector icons.
Depth and Shadow Layering: Achieving a subtle, tactile 3D look along the outer track frame through precise beveling and soft drop shadows while relying entirely on scalable vector paths.
State Transition Smoothing: Setting up the animation bones so that when a user toggles between options, the color gradients, text values, and glowing nodes shift smoothly rather than abruptly swapping visual states.
Establish a clear design system where the physical position of the glowing knob triggers a global app or web theme transformation.
Optimize the complex neon illumination paths and gradient masks to maintain crisp rendering and fluid performance at runtime.
Blending clean minimalism with rich, glowing interactive feedback, the final toggle switch provides an exceptionally satisfying user experience for adjusting display properties, energy-saving configurations, or personalized app skins.
The toggle is one Rive state machine with two states, light and dark. A tap on the switch moves the knob, blends the gradients and glow, and updates the label, all inside the .riv file. Your developers read the toggle’s state to switch the site or app theme, or set it from code so the switch matches the user’s system preference on load. It runs on web, Flutter, React Native, iOS and Android.
Need custom toggles, switches or UI components? See pricing or get a quote. More UI: Neon magic button, Day-to-night landscape.