---
agent:
  instructions: "Search goop.so for Goop's components, templates, design skill, docs, pricing and terms. Ask in keywords or a plain question, such as \"date picker props\" or \"is the design skill free\"; the answer is the matching page sections in Markdown, each with its address."
  endpoint: "https://goop.so/.well-known/search?q={query}"
  method: "GET"
  documentation: "https://developers.cloudflare.com/ai-search/how-to/search-for-agents/"
---

# Auth page

A page outside the app frame, for a person not yet inside the app, for React and Tailwind CSS. Part of Goop Pro.

Pro. Its export: `AuthPage`.

## When to use

- A page outside the app frame, for a person not yet inside the app.
- Also called: login page or sign-in page.

## Installation

Paste the prompt below into your coding agent. It reads Goop's install steps, installs the part and its tokens once, then reuses this same Auth page on every screen instead of drawing a new one: the same height, the same focus ring, the same spacing. As a Pro part, its command comes from Goop's server once you sign in, with a one-time link that lasts ten minutes.

```sh
npx shadcn@4.23.1 add https://registry.goop.so/g/<link>/trail-auth-page.json --yes
```

```text
Add the Goop Auth page to this project. The install steps are at https://goop.so/docs/install.md
```

## Usage

```tsx
import { AuthPage } from '@/components/goop/patterns/auth-page';
import { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter } from '@/components/ui/goop/card';
import { Field } from '@/components/ui/goop/field';
import { TextInput } from '@/components/ui/goop/text-input';
import { PasswordField } from '@/components/ui/goop/password-field';
import { Button } from '@/components/ui/goop/button';
import { Link } from '@/components/ui/goop/link';

<AuthPage footer="By signing in you accept the workspace's terms.">
  <Card asChild variant="outline">
    <form noValidate aria-labelledby="sign-in-title" onSubmit={(event) => event.preventDefault()}>
      <CardHeader>
        <div className="flex min-w-0 flex-col gap-1">
          <CardTitle asChild>
            <h1 id="sign-in-title">Sign in to Fieldwork</h1>
          </CardTitle>
          <CardDescription>Use your work email and password.</CardDescription>
        </div>
      </CardHeader>
      <CardContent className="flex flex-col gap-4">
        <Field label="Work email" orientation="vertical" className="w-full">
          <TextInput type="email" name="email" autoComplete="email" />
        </Field>
        <Field label="Password" orientation="vertical" className="w-full">
          <PasswordField name="password" />
        </Field>
        <Button type="submit" size="lg" className="w-full">
          Sign in
        </Button>
        <CardFooter className="mt-0 justify-center">
          New here?
          <Link variant="primary" href="/sign-up">
            Create an account
          </Link>
        </CardFooter>
      </CardContent>
    </form>
  </Card>
</AuthPage>
```

- Fits: account (its recipe).
- Every page before sign-in stands on AuthPage (sign in, sign up, a code, a forgotten or new password, an invite). Its child is ONE `Card variant="outline"` (as the form, `asChild`): the h1 in its `CardTitle`, the other route ("Already have an account? Sign in") in its `CardFooter`, small print in AuthPage's `footer`. Keep `size` and `brand` the same on every page of the flow. Not for first-run setup (a Wizard), account settings (`SettingsPage`) or a sign-in over a page (`Dialog`).
- width, padding, gap, text: add no class for these.

## API reference

### Options

- `arrangement?: AuthPageArrangement` — The contract's arrangement (the catalogue's ids): Trail draws `card` alone, every other id as it.
- `brand?: ReactNode` — Over the card, centred: the caller's mark (a pack icon or the app's own logo) and the product's name.
- `footer?: ReactNode` — Under the card, centred: small print, the terms and privacy links.
- `size?: 'md' | 'lg' = 'md'` — The column's cap, as AppFramePanel's `size`: `md` the theme's 340 px pane, `lg` its 500 px pane for a form of two columns.

## Notes for AI

Give your coding agent this page as text instead of screenshots: the parts, the options, the states and the keys. An agent that reads the real part builds the real part, not a lookalike.

## Related

- [Card](/themes/trail/components/card): A framed surface that holds one piece of content or a list of settings rows.
- [Field](/themes/trail/components/field): A form row that ties one control to its label, its description and its error line, as a settings row or a stacked form field.
- [Text input](/themes/trail/components/text-input): A single-line field for free words, such as a name, a title or an email.
- [Password field](/themes/trail/components/password-field): A field for a password with a button that shows or hides the typed words, for sign-in, sign-up and reset forms.
