Unlock faster development with Fidely UI Pro components Coming soon

Float Input

A floating label input built on the Input and Field components for compact, accessible forms.

FloatInput is currently in Alpha, don't use in production

Usage

import { FloatInput } from '@fidely-ui/react'
<FloatInput />

The FloatInput combines the Input and Field.Label components to create an input with a floating label.

It accepts all props available in Input component.

Examples

Error Text

Wrap the FloatInput in Field.Root and pass the invalid prop to Field.Root, then use Field.Error to show validation feedback.

This is an error text

Helper Text

Use the Field.HelperText to add helper text to the field.

This is a helper text

Disable

You can use the disabled prop to disable the field.

Size

Pass the size prop to adjust both the input height and label font size.

Props

FloatInput

PropTypeDefaultDescription
labelstringThe floating label text displayed above the input when focused or filled.
idstringPlease wrap your FloatInput with Field.Root.
size"2xs" | "xs" | "sm" | "md" | "lg" | "md" | "lg" | "xl" | "2xl" "md"Controls the height of the input and size of the label.
disabledbooleanfalseDisables the input and label interaction.
typestring"text"The input type (e.g., text, email, password).
valuestringThe controlled value of the input.
onChange(event: React.ChangeEvent<HTMLInputElement>) => voidCallback invoked when the input value changes.
namestringThe name of the input field for form submission.

On this page