Kinetik UI

Reveal Field

.md

A password field with an eye that blinks as the text turns between dots and letters, and a slash that wipes away.

v1.0.0Live on web@shopify/react-native-skiareact-native-reanimatedreact-native-worklets
Component preview

Installation

Kinetik CLI
npx kinetik-ui add reveal-field

The CLI copies the source and installs native dependencies with npx expo install, so versions match your Expo SDK. With shadcn: npx shadcn@latest add https://kinetik-ui.dev/r/reveal-field.json

Install manually

  1. Install dependencies
    npx expo install @shopify/react-native-skia react-native-reanimated react-native-worklets
  2. Copy the source files
    • components/kinetik/reveal-field.tsx
    View source files

Usage

import { RevealField } from '@/components/kinetik/reveal-field';

<RevealField
  value={password}
  onChangeText={setPassword}
  placeholder="At least 12 characters"
  autoComplete="new-password"
/>;

When to use

  • Any password or PIN field, so people can check what they typed before sending it.
  • Sign up and change-password forms, where mistakes are expensive.

When not to use

  • One-time codes. Use Code Field, which shows each digit in its own box.
  • Values that must never be shown on screen, such as a card security code in a shared space.

Notes

  • The eye blinks shut and open while the text dips and turns between dots and letters; the slash across it draws in or wipes away.
  • The eye button is named "Show password" or "Hide password" for screen readers.
  • Every other TextInput prop (auto-complete, return key, placeholder) is passed through. Pair it with Password Meter for new passwords.

Props

RevealFieldProps

PropTypeDefaultDescription
valuerequiredstring—
onChangeTextrequired(text: string) => void—
labelstring'Password'Shown above the field and used as its accessible name. Defaults to "Password".
defaultRevealedbooleanfalseStart with the text visible. Defaults to false.
hapticsbooleantrueA light tap when the eye toggles. Defaults to true.
styleStyleProp<ViewStyle>—

Performance and accessibility

Performance

Budget
A native text input and a 24 pt Skia icon driven by four shared values. Nothing runs at rest.
Measured

Pixel 9 emulator, API 35, release build · interaction median 1.00× the system Settings app on the same emulator (indicative only) · no frames drawn at rest · 151 MB app memory

Real-device measurement pending.

Accessibility

Reduced motion
The text and the slash switch at once, without the blink.
Screen readers
A secure text field named by its label, and a button named "Show password" or "Hide password".
Touch target
The eye button is 48 by 50 pt; the field is 52 pt tall.

Source files

components/kinetik/reveal-field.tsx is in the Code tab of the preview above.