RTL Floating Label
A Hebrew input whose label floats up to the right corner
Create an RTL floating label input. A dir="rtl" text field (rounded, 1.5px hairline border) whose label ('שם מלא') rests inside the field aligned to the right, where Hebrew text starts. On focus or when the field has a value, the label floats up to the top-right corner with a spring (stiffness 420, damping 30), shrinking to ~78% size, tinting accent, and sitting on a small surface-colored padding patch so it reads cleanly across the border line. It is the mirror image of the LTR pattern: a label floating top-left in a Hebrew form is the giveaway of an unmirrored component. While focused the border darkens to ink and a thin accent caret blinks at the text insertion point (right side, moving left as text grows). When the field is validly filled, a green check badge pops in with a spring at the field's end side, the left in RTL (inset-inline-end), and the border and floated label tint green. Anchor everything with logical properties (inset-inline-start for the label, inset-inline-end for the badge) so the identical component flips under dir="ltr". Wire it to real focus, blur and input events on an actual input, with the label as a real <label for=...>. The label floats when the field is genuinely focused or filled; do not script a focus or type Hebrew into it on a timer. Accessibility: the label stays a real label element bound to the input; validation state is conveyed by the check plus aria-invalid, never color alone. If prefers-reduced-motion is set, move the label instantly with no spring. 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.