Skip to content
nexubDesign System
v11.9.0

Components · Forms

Floating Input

BetaAdded v4.4.0

A text field whose label sits inside and floats up on focus or input. CSS only.

import { FloatingInput } from '@nexub/react';
View as Markdown

Playground

Props

TSX
<FloatingInput type="email" autoComplete="email" label="Email" />

Examples

Sign-in form

Props

Props
PropTypeDefaultDescription
labelrequiredstring—Always visible: inside the empty field, above the value otherwise.
...inputInputHTMLAttributes—Any input attribute except placeholder. Set aria-invalid for errors.

Accessibility

Screen reader

  • A real `<label>` tied to the input, so the name never disappears.

On iOS & Android