Kinetik UI

Login

.md

An email and password sign-in that settles in row by row, with inline errors and provider buttons.

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

Installation

Kinetik CLI
npx kinetik-ui add login

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/login.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/login.tsx
    View source files

Usage

import { Login } from '@/components/kinetik/screens/login';

<Login
  onLogin={async ({ email, password }) => {
    const { error } = await auth.signIn({ email, password });
    if (error) throw new Error('Email or password is incorrect.');
    router.replace('/home');
  }}
  onForgotPassword={() => router.push('/reset')}
  onSignUp={() => router.push('/sign-up')}
  providers={[
    {
      id: 'apple',
      label: 'Continue with Apple',
      icon: <AppleLogo />,
      onPress: signInWithApple,
    },
    {
      id: 'google',
      label: 'Continue with Google',
      icon: <GoogleLogo />,
      onPress: signInWithGoogle,
    },
  ]}
/>;

onLogin runs only when the email looks valid and the password is not empty. Return a promise to show a spinner; throw an Error and its message appears above the button.

When to use

  • Apps with email and password accounts, optionally next to Apple or Google sign-in.

When not to use

  • Passwordless sign-in: use the Auth screen, which sends a one-time code.
  • Sign-up: it needs different copy, password rules and consent; build it from the same parts.

Notes

  • Provider buttons take your own icons, so you can follow each provider's branding rules.
  • The form sits in a KeyboardAvoidingView and scrolls, so the button stays reachable with the keyboard open.
  • Pass logo to replace the mark at the top with your app icon.

Props

LoginProps

PropTypeDefaultDescription
onLoginrequired(credentials: LoginCredentials) => Promise<void> | void—Sign in. Return a promise for a spinner; reject with an Error to show its message.
onForgotPassword() => void—
onSignUp() => void—Shows "Don't have an account? Sign up" at the bottom.
providersreadonly LoginProvider[][]Buttons under the form, e.g. Apple and Google.
titlestring'Welcome back'
subtitlestring'Log in to pick up where you left off.'
logoReactNode—Replaces the mark at the top.

Performance and accessibility

Performance

Budget
The entrance is a one-off layout animation per block on the UI thread; after that the screen is static apart from the button's press spring.
Measured

Pixel 9 emulator, API 35, release build · interaction median 1.06× the system Settings app on the same emulator (indicative only) · no frames drawn at rest · 157 MB app memory. Most janky frames are the software keyboard opening and closing on the emulator; scrolling the form stays at the baseline.

Real-device measurement pending.

Accessibility

Reduced motion
Blocks appear in place, the title appears without rising and the password eye switches without animating (Reveal Field).
Screen readers
Fields are named Email and Password; their errors are read as they appear. A failed sign-in is an alert. The button reports when it is busy.
Touch target
Fields are 52 pt tall; the button is 56 pt; links are at least 44 pt.

Source files

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