motionsnack

Animated React sections that already feel finished.

Copy them into Next.js or add them with one command. Plain React and Tailwind, light and dark.

New sections, once a month

One short email when something new lands. No spam.

Library

  • Sections
  • Blocks
  • Components
  • Application UI
  • Templates

Popular

  • Hero
  • Gallery
  • Testimonials
  • Stats
  • Logos
  • FAQ

Resources

  • Installation
  • All components
  • All blocks
  • All sections
  • All application UI
  • Design system
  • Changelog
  • Pricing

Company

  • About
  • Contact
  • Terms
  • Privacy

Install

npx motionsnack add <name>Step-by-step guidehello@motionsnack.dev
Kuba Šťastný@kubastastnydev

© 2026 motionsnack. All rights reserved.

TermsPrivacy

motionsnack

motionsnack
DocsSectionsTemplatesWhat's newPricing
Get lifetime access
  1. Home
  2. Docs
  3. Components
  4. Input
  5. Floating Label Input
ComponentsBlocksSectionsApplication UI
ComponentsBlocksSectionsApplication UI

Accordion

  • Spring Accordion

Alert

  • Glow Alert

Audio

  • Podcast PlayerNew
  • Voice NoteNew
  • Voice RecorderNew

Avatar

  • Avatar Stack

Badge

  • Pulse Badge

Breadcrumb

  • Slide Breadcrumb

Button

  • Chip ButtonNew
  • Glow Border Button
  • Glow ButtonNew
  • Plain ButtonNew

Calendar

  • Month Calendar

Checkbox

  • Checkbox CardsNew
  • Checkbox GroupNew
  • Chip CheckboxNew

Cropper

  • Image Cropper

Dialog

  • Spring Dialog

Dropdown

  • Command MenuNew
  • Stagger Dropdown
  • Switcher DropdownNew

File Upload

  • Drop Zone Upload

Input

  • Addon InputNew
  • Button InputNew
  • Copy InputNew
  • Date InputNew
  • Floating Label Input
  • Joined InputsNew
  • Notched Label InputNew
  • Number StepperNew
  • OTP InputNew
  • Password InputNew
  • Phone InputNew
  • Range InputNew
  • Search InputNew
  • Tag InputNew
  • Text FieldNew

Loader

  • Curtain LoaderNew
  • Greeting LoaderNew
  • Line LoaderNew
  • Meter LoaderNew
  • Split LoaderNew

Navigation Menu

  • Mobile Tab BarNew

Notification

  • Notification BellNew
  • Toast Stack

Pagination

  • Sliding Pagination

Popover

  • Spring Popover

Radio

  • Card Radio Group
  • Payment MethodNew
  • Radio GroupNew
  • Rating RadioNew

Select

  • ComboboxNew
  • Glide Select
  • Multi SelectNew
  • Rich SelectNew
  • Select FieldNew
  • Tree SelectNew

Sidebar

  • Icon RailNew

Slider

  • Glow Slider

Stepper

  • Progress Stepper

Switch

  • Billing SwitchNew
  • Switch RowNew
  • Toggle SwitchNew

Table

  • Sortable Table

Tabs

  • Sliding Tabs

Textarea

  • Auto Grow Textarea

Toggle

  • Icon ToggleNew
  • Theme ToggleNew
  • Toggle GroupNew

Tooltip

  • Follow Tooltip

Input

Floating Label Input

A text field whose label rests inside and floats up out of the way when you focus or type.

npx motionsnack add floating-label-input

Customize

Error Colour
Warning Colour
Success Colour
px
px
s
<FloatingLabelInput />

Props

30 properties

PropertyTypeDefaultDescription
valuestring-Controlled value. Leave undefined to let the component manage it.
defaultValuestring''Value on first render when uncontrolled.
onChange(value: string) => void-Called with the new text on every change.
namestring-Name submitted with a form.
autoCompletestringfrom typeNative autocomplete hint.
clearLabelstring'Clear text'Accessible name of the clear button.
invalidbooleanfalseInvalid without its own message.
charactersOverLabelstring'{n} characters too many.'Error text past the limit.
idstringgeneratedId of the input.
classNamestring''Extra classes on the wrapper.
labelstring'Email address'Label that rests inside the field and floats up on focus or when the field is filled.
placeholderstring''Hint inside the field, visible only while the label is floated.
helperTextstring'We only use it to send your receipt.'Small text under the field. Empty hides it.
errorstring''Error message. Any text turns the border red and replaces the helper text.
type'text' | 'email' | 'password' | 'search' | 'tel' | 'url''email'Native input type.
icon'mail' | 'user' | 'lock' | 'search' | 'none''mail'Icon at the start of the field.
requiredbooleanfalseMarks the field as required.
disabledbooleanfalseDisables the field.
readOnlybooleanfalseFocusable and selectable, but not editable.
clearablebooleanfalseClear button while the field has a value.
maxLengthnumber0Character limit for the counter. 0 = no limit.
showCounterbooleanfalseCharacter counter from 85 % of the limit.
warningstring''Warning message in the helper slot. Does not block submit.
successbooleanfalseCheck at the end after an async check passed.
errorColorstring''Error colour for both themes. Empty uses the per-theme pair.
warningColorstring''Warning colour for both themes. Empty uses the per-theme pair.
successColorstring''Success colour for both themes. Empty uses the per-theme pair.
heightnumber48Height of the field.
radiusnumber12Corner radius of the field.
durationnumber0.3Seconds the label takes to float up.

About Floating Label Input

Floating Label Input keeps its label inside the field until you focus it or type, then slides it up and shrinks it out of the way. Focus shows the library's clear outline, white on dark pages and black on light ones. A leading icon, helper text and a required mark are optional, and passing an error message turns the border red and swaps the helper text for the message. The label moves on a CSS transition with a duration you set, skipped for reduced motion, and the field works controlled or uncontrolled.

What's included

  • Label that floats on focus or when the field is filled
  • Clear focus outline, white on dark and black on light
  • Error state with a red border and an alert message
  • Optional leading icon from 4 inline SVG icons
  • Helper text, required and disabled states
  • Controlled and uncontrolled value
  • Light and dark look
Type
Animated React input component
Library
Components · Input
Stack
Next.js, React, Tailwind CSS
Added
2026-09-20
Install
npx motionsnack add floating-label-input