Floating Label Input
aka Material Input · Animated Label
The label sits inside the field at rest, then floats up on focus.
When to use
Forms where you want elegance over density. Avoid in admin tools. Eats vertical space.
Anatomy
- Field 56px tall
- Label absolute, transitions on focus / has-value
- Bottom-border or full-border variant
How the industry does it
1 examples · credited
Prompt
Build a floating-label text input. 56px tall, rounded-xl, background rgba(255,255,255,0.03), 1px border rgba(255,255,255,0.08). The label sits at the vertical center at rest in ink-400; on focus or when the input has a value, it animates to the top-left, shrinks to 11px, and lifts above the field's visual baseline. Smooth 180ms cubic-bezier transitions. On focus the border brightens to rgba(255,255,255,0.24). Include error state with a red 1px border and an inline message below the input.Polish & tuning
2 of 4 unlockedMotion
Ease-out for entrance, ease-in-out for state. 200ms hover, 400–600ms layout. Stagger children at 30–60ms so groups feel intentional, not synchronized.
Spacing
Pick one scale (4 or 8) and don't mix. Section padding 96–128px desktop, 48–64px mobile. Headline sits ~24px above the subhead; subhead ~32px above the CTA cluster.