Date Segments Input
DD/MM/YYYY boxes with a hopping focus ring and a validating check
Create a segmented date input (DD / MM / YYYY). Three bordered boxes sized to their content (two digits, two digits, four digits: monospace tabular-nums so width is exact), separated by muted slashes. Empty segments show their placeholder pattern ('DD', 'MM', 'YYYY') in muted text; typed digits render bold ink. The focus ring is one shared element that hops between segments: an accent border with a soft outer glow (3px accent at 15% alpha) wrapped around the active segment, moving to the next with a shared layout spring (stiffness 420, damping 30) the moment a segment fills - auto-advance made visible. Inside the active segment a thin accent caret blinks after the typed digits. When the final segment completes and the date validates, the confirmation plays: all three borders transition to green (0.3s) and a green check badge pops in at the end of the row (spring from 30% scale, stiffness 520, damping 20). An invalid date instead shakes the offending segment (±4px, 3 cycles, 0.3s) and tints it red, never color alone: pair it with an error message. Build it as one input per segment: digits auto-advance on fill, Backspace on an empty segment jumps back, paste of a full date distributes across segments. The ring hops when a segment actually fills from a real keystroke; do not script digits into the boxes. Accessibility: group the three inputs under one visible label with aria-describedby for format; each segment has its own aria-label ('Day', 'Month', 'Year'); validation is announced via aria-live. If prefers-reduced-motion is set, the ring jumps without springing and the check appears instantly. 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.