React Native Glass Search Bar for Expo

A floating glass search pill that swells on focus as a cancel button splits off.

ProiOS · Android · Expo Go
9:41

Props

PropTypeDefault
value / defaultValue / onChangeText

Controlled or uncontrolled query; clear and cancel report ''.

string—
placeholder

Placeholder, also the field's accessibility label.

stringlabels.search
onSubmit

Called with the query when the keyboard's search key is pressed.

(text: string) => void—
showCancel

A glass cancel button springs in beside the pill while focused or holding text.

booleanfalse
cancelLabel

Text for the cancel button, e.g. "Cancel"; without it the button is a round ✕.

string— (round ✕)
onCancel

After cancel clears the query and dismisses the keyboard.

() => void—
leading

Replaces the magnifier at the start of the pill.

ReactNodemagnifier
trailing

Inside the pill at the end, e.g. a mic button.

ReactNode—
autoFocus

Focus the field on mount.

booleanfalse
scheme

Force light or dark glass and ink, e.g. 'dark' over a photo.

'light' | 'dark'kit theme
size

44 / 52pt tall; font, icons and padding scale too.

'md' | 'lg''md'
style

Row holding the pill and the cancel button.

StyleProp<ViewStyle>—
className

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

string—
…TextInputProps

editable, returnKeyType, onFocus, onBlur, onSubmitEditing, … (ref forwards to the TextInput).

Behaviour & accessibility

Motion
The pill swells a touch on focus and a clear button pops in once there is text. With showCancel, a glass cancel button springs in beside it while searching.
Reduced motion
The pill no longer swells, and the clear and cancel buttons fade in with a short timing instead of a spring.
Keyboard
The return key reads Search and calls onSubmit with the query. Cancel clears the text and dismisses the keyboard.
Screen readers
The field has the search role and is labelled by its placeholder. The clear and cancel buttons read "Clear search" and cancelLabel (or "Cancel search").
Platforms
Real Liquid Glass on iOS 26, where the pill and cancel button melt together. Blur or frosted glass everywhere else.

Source

FAQ

How do I make a liquid glass search bar in React Native?
Use ExpoKit's Glass Search Bar, a Pro component: with ExpoKit Pro, the ExpoKit CLI copies a ready-made liquid glass search bar into your Expo or React Native app as plain TypeScript you can edit. It works on iOS, Android and web, and in Expo Go.
Does Glass Search Bar work in Expo Go?
Yes. Glass Search Bar runs in Expo Go on iOS and Android with no development build — its packages (expo-glass-effect, expo-blur, react-native-svg) are all included in Expo Go.
How do I add Glass Search Bar to my Expo app?
With ExpoKit Pro, add it with the ExpoKit CLI: it copies the component's source into your app and installs expo-glass-effect, expo-blur, react-native-svg, so the code is yours to change. The install command is on this page for Pro members.
Is Glass Search Bar free?
Glass Search Bar is part of ExpoKit Pro. With a Pro plan, log the CLI in once (npx @expokit/cli@latest login) and it installs the full source into your app.