Kinetik UI

Auth

.md

Passwordless sign-in: an email, a one-time code with a resend timer, and a check once you are in.

v1.0.0Live on webreact-native-reanimatedreact-native-safe-area-contextreact-native-worklets
Component preview

Installation

Kinetik CLI
npx kinetik-ui add auth

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/auth.json

Install manually

  1. Install dependencies
    npx expo install react-native-reanimated react-native-safe-area-context react-native-worklets
  2. Copy the source files
    • components/kinetik/screens/auth.tsx
    View source files

Usage

import { Auth } from '@/components/kinetik/screens/auth';

<Auth
  onSendCode={(email) => auth.sendOtp({ email })}
  onVerify={async (email, code) => {
    const { error } = await auth.verifyOtp({ email, token: code });
    if (error) throw error;
  }}
  onDone={() => router.replace('/home')}
/>;

The demo accepts the code 123456.

When to use

  • Passwordless sign-in or sign-up with a one-time code sent by email (Supabase, Clerk, Firebase email links, your own API).
  • Confirming an address after sign-up.

When not to use

  • Codes sent by SMS: the copy, keyboard and field label assume email. Change them before you reuse the flow.
  • Accounts with passwords: use the Login screen.

Notes

  • onVerify runs as soon as the last digit is entered. Reject to shake and clear the code; resolve to play the success wave and move to the final step.
  • Resend unlocks after resendAfter seconds (default 30) and restarts the timer each time it is used.
  • Codes paste and autofill from the keyboard suggestion (Code Field handles one-time-code autofill).

Props

AuthProps

PropTypeDefaultDescription
onSendCoderequired(email: string) => Promise<void> | void—Send a one-time code to the address. Reject with an Error to show its message.
onVerifyrequired(email: string, code: string) => Promise<void> | void—Check the code. Reject when it is wrong; the field shakes and clears.
onDonerequired() => void—Called by the button on the final step.
codeLengthnumber6Digits in the code. Defaults to 6.
resendAfternumber30Seconds before the code can be sent again. Defaults to 30.
initialEmailstring''Prefills the address.

Performance and accessibility

Performance

Budget
Steps slide in with one layout animation each; the code row and the final check are UI-thread springs. The resend countdown re-renders once a second while it runs.
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 · 154 MB app memory. Most janky frames are the software keyboard and the step slide on the emulator; the code row itself stays at the baseline.

Real-device measurement pending.

Accessibility

Reduced motion
Steps cross-fade instead of sliding, the check appears without popping or a ring, and the code row does not shake or wave (Code Field).
Screen readers
Each step leads with its title. The code field is named Verification code; checking, a wrong code and a resent code are announced. The countdown reads "You can resend the code in 24 seconds".
Touch target
The email field is 52 pt; buttons and links are at least 44 pt.

Source files

components/kinetik/screens/auth.tsx is in the Code tab of the preview above.