React Native Floating Input for Expo

Install

Floating Input · Sign Up, native in Expo Go — the other variants are a tap away. No account needed.

Needs Expo Go for SDK 58 — update from the App Store or Play Store.

A text field whose label glides onto the border as an accent halo blooms.

iOS · Android · Expo Go
9:41

Installation

One command copies the source into your app — you own the code and can change anything.

After you add the file, import it like any local component:

App.tsx
import { FloatingInput } from "@/components/ui/floating-input";

Or add it with the CLI (installs any missing peers):

Usage

Colours, radius and light / dark come from useKit(). Wrap your app in <KitProvider accent="#6366f1" radius={14}> to re-skin every component at once.

Like this? There's a lot more in Pro Pro

12 full screens built from the same kit — install them the same way.

See what's in Pro

Props

PropTypeDefault
label

Placeholder that floats onto the border.

string—
floatingLabel

Set to false to put the label above the field as static text (no notch) and show placeholder inside; filled and underline work too.

booleantrue
variant

Notched outline, rounded filled, or bare underline (filled/underline bars grow from the centre on focus).

"outlined" | "filled" | "underline""outlined"
size

44 / 54 / 64pt — font, padding, radius and icons scale too.

"sm" | "md" | "lg""md"
error

Red state, icon + message that slides in, one shake.

string—
success

Green border + animated check; a string is shown as the message.

boolean | string—
helper

Hint under the field.

string—
prefix / suffix

Inline text like "₹", "+91", "INR" — fades in when the label floats.

string—
counter

Shows length/maxLength under the field (needs maxLength).

booleanfalse
left / right

Icons or adornments inside the field.

ReactNode—
clearable

Animated SVG clear button while there's text.

booleanfalse
accent

Focus border, halo and label colour.

stringtheme accent
surface

Colour behind the field (paints the notch).

stringtheme background
style

Style for the outer wrapper around the field and message line (the one that shakes).

StyleProp<ViewStyle>—
className

Tailwind classes on the root when using NativeWind or Uniwind. Prefer style for StyleSheet overrides.

string—
fieldStyle

The bordered box: background, border width / colour, radius, height, padding. Wins over the computed style; a borderColor replaces the resting border only (focus, error and success colours still show). A numeric height / borderRadius re-centres the label and resizes the halo.

StyleProp<ViewStyle>—
inputStyle

The typed text — fontSize, fontWeight, color, letterSpacing, fontFamily.

StyleProp<TextStyle>—
labelStyle

Label in both modes (floating and above). color is the resting colour — focus (accent), error and success still take over; fontSize sets the resting size, it floats at the same ratio and the notch follows its width.

StyleProp<TextStyle>—
messageStyle

Helper / error / success text. color applies to the helper; error and success keep their tone colour.

StyleProp<TextStyle>—
prefixStyle / suffixStyle

Prefix / suffix text (still fades in with the label).

StyleProp<TextStyle>—
counterStyle

The length/maxLength counter; turns danger at the limit regardless.

StyleProp<TextStyle>—
placeholderTextColor

Placeholder colour (floatingLabel={false}).

stringtheme mutedForeground
iconColor

Clear button colour at rest.

stringtheme mutedForeground
…TextInputProps

Everything TextInput accepts.

Customization

You own the source file — tune appearance with props (no fork required for most tweaks). For brand-wide colours and radius, wrap your app in KitProvider; for one-off looks, use the style props below.

Design theme

Open Design theme on the live preview — accent, corner radius and font update every variant instantly (same as KitProvider in your app).

Variants

Pick the Variants chip above the preview, or set variant=… — "outlined" | "filled" | "underline".

Style props

React Native style and typed slots like fieldStyle, plus optional root className when you use NativeWind or Uniwind (cnProps from kit).

Open the Custom Styles variant on the preview, then switch to the Code tab for a full fieldStyle / labelStyle example.
variant
"outlined" | "filled" | "underline" · default "outlined"Notched outline, rounded filled, or bare underline (filled/underline bars grow from the centre on focus).
size
"sm" | "md" | "lg" · default "md"44 / 54 / 64pt — font, padding, radius and icons scale too.
accent
string · default theme accentFocus border, halo and label colour.
surface
string · default theme backgroundColour behind the field (paints the notch).
style
StyleProp<ViewStyle>Style for the outer wrapper around the field and message line (the one that shakes).
className
stringTailwind classes on the root when using NativeWind or Uniwind. Prefer style for StyleSheet overrides.
fieldStyle
StyleProp<ViewStyle>The bordered box: background, border width / colour, radius, height, padding. Wins over the computed style; a borderColor replaces the resting border only (focus, error and success colours still show). A numeric height / borderRadius re-centres the label and resizes the halo.
inputStyle
StyleProp<TextStyle>The typed text — fontSize, fontWeight, color, letterSpacing, fontFamily.
labelStyle
StyleProp<TextStyle>Label in both modes (floating and above). color is the resting colour — focus (accent), error and success still take over; fontSize sets the resting size, it floats at the same ratio and the notch follows its width.
messageStyle
StyleProp<TextStyle>Helper / error / success text. color applies to the helper; error and success keep their tone colour.
prefixStyle / suffixStyle
StyleProp<TextStyle>Prefix / suffix text (still fades in with the label).
counterStyle
StyleProp<TextStyle>The length/maxLength counter; turns danger at the limit regardless.
placeholderTextColor
string · default theme mutedForegroundPlaceholder colour (floatingLabel={false}).
iconColor
string · default theme mutedForegroundClear button colour at rest.

Map tokens from your design system on Bring your design system or read Theming for KitProvider and NativeWind / Uniwind setup.

Behaviour & accessibility

Touch
Tapping anywhere on the field focuses the input. With clearable, a × springs in once there is text and empties the field.
Motion
The label springs onto the border on focus or when filled, and a soft halo blooms around the field. An error shakes it once; a success check springs in.
Screen readers
The input is labelled with your label and the clear button reads "Clear" plus the label. Helper, error and success messages are polite live regions.
Web
Browser autofill floats the label too, and the field keeps its own background instead of the autofill blue.

Source

FAQ

How do I make a floating label input in React Native?
Use ExpoKit's Floating Input: run npx @expokit/cli@latest add floating-input in your Expo or React Native project and it copies a ready-made floating label input into your app as plain TypeScript you can edit. It works on iOS, Android and web, and in Expo Go.
Does Floating Input work in Expo Go?
Yes. Floating Input runs in Expo Go on iOS and Android with no development build — its packages (react-native-svg) are all included in Expo Go.
How do I add Floating Input to my Expo app?
Run npx @expokit/cli@latest add floating-input in your project. The CLI copies the component's source into your app and installs react-native-svg, so the code is yours to change.
Is Floating Input free?
Yes. Floating Input is free: its full source is on this page and the CLI installs it without an account.
Can I change how Floating Input looks?
Yes. It takes its colours, radius and light / dark mode from useKit(), so wrapping your app in <KitProvider accent radius> re-skins it with every other ExpoKit component. The code lives in your project, so you can also edit anything directly.