Password Visibility Toggle
An eye that flips and the dots dissolve into the real password
Create a password field with an animated visibility toggle. A password input with an eye icon button at its right edge. Toggling does three things together: the eye icon swaps between eye and eye-off by rotating out (-40deg, shrinking to 70%, fading) while the new icon rotates in (180ms); the field content crossfades vertically with a slight blur (old value slides 10px and blurs 2px out, new one slides in, 220ms) between masked dots (letter-spacing 0.18em) and the real text (letter-spacing 0.02em); and the input border tints to the accent color while visible (250ms). Below the field, a small monospace hint line switches between "hidden" and a visible-state warning, its color following the border. Use a fixed-height overflow-hidden span for the value so the crossfade doesn't shift layout. In production this wraps a real input whose type switches between password and text. Accessibility: the toggle uses aria-pressed and swaps aria-label between "Show password" and "Hide password". If prefers-reduced-motion is set, swap icon and text instantly with no rotation or blur. Build the component, not this demo of it. - Ambient motion that IS the component may loop: a drifting background, a marquee, a spinner while something is genuinely loading. - Do not add any timer, interval, loop or script that performs a person's action by itself. No auto-hover, no auto-click, no cycling through states, no pretend submitting, no replaying the interaction on a schedule. - Every state that answers a person waits for a real event from that person. - Placeholder copy and sample content are welcome. Simulated behaviour is not.