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';Playground
Props
<FloatingInput type="email" autoComplete="email" label="Email" />Examples
Sign-in form
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| labelrequired | string | — | Always visible: inside the empty field, above the value otherwise. |
| ...input | InputHTMLAttributes | — | 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
Web only
Floating Input has no @nexub/react-native twin. On phones, follow the platform pattern instead, or compose it from the native components listed on the React Native page.