Forms

Floating Label

A label that slides up when you focus or type in the field. Wrap one Input, Select, or Textarea with it.

ReactVueWeb Components
View in Storybook

Playground

Examples

<FloatingLabel label="Email"><Input type="email" /></FloatingLabel>

Props

Name Type Default Description
label required ReactNode The floating label text.
children required ReactElement<{ id?: string; placeholder?: string }> A single control element (Input/Select/Textarea). It receives an `id` and, for inputs, a `placeholder` (required for the CSS float trigger).
className string

Accessibility

  • Body/background contrast is ≥ 7:1 (AAA) in both light and dark.
  • Every interaction works with the keyboard alone.
  • The focus ring is always visible.
  • Respects prefers-reduced-motion and stops excessive motion.

Every component is designed to meet WCAG 2.1 AAA.