# React Native sign in screen (Pro)

> A React Native sign in screen for iOS, Android and the web: email and password with inline errors that clear as you fix them, social sign-in buttons, forgot password and a sign-up link. Built from free patine-ui components.

# Sign in Pro

Email and password with errors that show under the field and clear as you fix them, a busy button while it checks, a notice when the server says no, social buttons above, and links to reset the password or sign up. Try any email with the password **patine**.

```tsx
import { SignInScreen } from '@patine-ui/pro';
```

```tsx live device
import { SignInScreen } from '@patine-ui/pro';

const wait = (ms) => new Promise((resolve) => setTimeout(resolve, ms));

export default function Example() {
  return (
    <SignInScreen
      onSubmit={async ({ password }) => {
        await wait(900);
        if (password !== 'patine') throw new Error('Demo: the password is “patine”.');
      }}
      onForgotPassword={() => {}}
      onSignUp={() => {}}
      providers={[
        { id: 'apple', label: 'Continue with Apple', onPress: () => {} },
        { id: 'google', label: 'Continue with Google', onPress: () => {} },
      ]}
    />
  );
}
```

## Make it yours

| Prop | Type | Default |
| --- | --- | --- |
| `onSubmit` | `({ email, password }) => void \| Promise<void>`: throw to show the error | **Required** |
| `providers` | `{ id, label, onPress }[]` | None |
| `onForgotPassword`, `onSignUp` | `() => void` | Hides the link when left out |
| `notice` | `string`: a message above the form | None |
| `labels` | `Partial<SignInLabels>` | English |

Built from the free [TextField](/docs/components/text-field), [Button](/docs/components/button) and [Alert](/docs/components/alert).

## In real apps

Every complete app has its own version of this screen, wired to its auth, data and settings: see the [templates](/templates).

## Related

- [Onboarding](./onboarding) PRO
- [Settings](./settings) PRO
- [All blocks](./overview)
