Animated Input

React text input with smooth focus animations, floating labels, and visual feedback. Modern form input component with Motion transitions for better UX.

Open in v0~0.9 kB

Last updated: March 7, 2026

Animated Input Examples

Try focusing on the inputs to see the label animation!

Installation

npx smoothui-cli add animated-input

Features

  • Smooth focus animations
  • Floating label support
  • Visual feedback on interaction
  • Customizable animation timing
  • Built with Framer Motion
  • Accessible form input

Accessibility

ARIA Attributes

AttributeElementPurpose
aria-labelInputProvides an accessible name matching the label text
aria-hidden="true"Icon containerHides the decorative icon from screen readers

Screen Reader

  • The floating label is programmatically associated with the input via htmlFor and id
  • The aria-label attribute provides an accessible name for assistive technologies

Reduced Motion

This component respects the prefers-reduced-motion media query via useReducedMotion from Motion. When reduced motion is preferred, the floating label transitions are applied instantly without animation.

Props