# App, sign up

- **[Sections](/blocks/)**
- **[Application](/blocks/app/)**
- **App, sign up**

Create an account: name, email and a password with its rules, a required consent checkbox that names the terms and privacy links, and idle, sending, error and…

## Import

- **CLI**

  ```
  npx shadcn add @klarhimmel/app-auth-signup
  ```
- **Import**

  ```
  import Block from '@/components/klarhimmel/blocks/app-auth-signup';
  ```

Also called

- app/auth-signup

- **About**: Create an account: name, email and a password with its rules, a required consent checkbox that names the terms and privacy links, and idle, sending, error and consent-missing states.
- **Category**: Interface sections for signed-in products. New project? Set it up once: /get-started/installation.

## Notes

- **When to use it**: Account creation with name, email, a password and a required consent box. For people who already have an account send them to `app-auth-signin`; after signup a code step like `app-auth-code` often follows.
- **Writing for it**: - The consent sentence is built from `before`, a terms link, `and` and a privacy link, with `before` up to 60 characters. Write it so it reads as one sentence when the links are inserted.
- `passwordHint` (120) should state the actual rule, such as the minimum length, so no one finds it out from an error.
- Fill `messages.consent` (120) with what is missing, for example that the terms must be accepted, since it describes the unticked box in the consent state.
- **Watch out for**: This block is strict: the consent sentence and its two links are never replaced by default text if they are invalid, so an empty terms or privacy label cannot ship. Pressing submit without ticking the box marks it as missing even when `state` is idle.

## Pairs well with

- **[App, sign in](/blocks/app/auth-signin)**
- **[App, one-time code](/blocks/app/auth-code)**
- **[App, welcome screen](/blocks/app/onboarding-welcome)**

## Usage

The block in a page, with its default content (long lists shortened). Every prop is in the table below.

section.tsx

```
import { Theme } from '@/components/klarhimmel/theme/style';
import { BlockSurface } from '@/components/klarhimmel/blocks/surface';
import AppAuthSignup from '@/components/klarhimmel/blocks/app-auth-signup';

export default function Section() {
  return (
    <Theme theme="brand">
      <BlockSurface>
        <AppAuthSignup props={{
          "eyebrow": "Name the section",
          "title": "Say what this page creates",
          "description": "Say in one line what a person gets with an account.",
          "nameLabel": "Full name",
          "emailLabel": "Work email",
          "passwordLabel": "Password",
          "passwordHint": "Say how long and what kind of secret is accepted.",
          "showLabel": "Show password",
          "hideLabel": "Hide password",
          "consent": {
            "before": "I agree to the",
            "terms": {
              "label": "Terms of service",
              "href": "#terms"
            },
            "and": "and",
            "privacy": {
              "label": "Privacy policy",
              "href": "#privacy"
            }
          },
          "submit": "Create account",
          "sending": "Creating it…",
          "alternative": {
            "text": "Ask if they have one already",
            "link": {
              "label": "Sign in",
              "href": "#sign-in"
            }
          },
          "state": "idle",
          "messages": {
            "error": "Say that the account was not created and to check the details.",
            "consent": "Say that they must agree to continue."
          }
        }} />
      </BlockSurface>
    </Theme>
  );
}
```

## Props

The type, default and text limit of every prop. On a real page, over-limit text is kept and checkSections flags it (Installation, Check a page before you ship); this live preview shows the default until it fits. The panel above edits all props.

- **eyebrow**: Text, up to 60 characters. Optional; empty is not rendered.
- **title**: Text, up to 120 characters.
- **description**: Text, up to 300 characters. Optional; empty is not rendered.
- **nameLabel**: Text, up to 40 characters.
- **emailLabel**: Text, up to 40 characters.
- **passwordLabel**: Text, up to 40 characters.
- **passwordHint**: Text, up to 120 characters.
- **showLabel**: Text, up to 30 characters.
- **hideLabel**: Text, up to 30 characters.
- **consent**: Fields: before, terms, and, privacy.
- **submit**: Text, up to 30 characters.
- **sending**: Text, up to 30 characters.
- **alternative**: Fields: text, link.
- **state**: One of 'idle', 'sending', 'error', 'consent'.
- **messages**: Fields: error, consent.
- **action**: Text, up to 300 characters. Optional; empty is not rendered.
- **method**: One of 'post', 'get'. Optional; empty is not rendered.
- **hidden**: Optional; empty is not rendered.
- **captcha**: Optional; empty is not rendered.
- **captchaSitekey**: Text, up to 100 characters. Optional; empty is not rendered.
- **headingLevel**: One of '1', '2'. Optional; empty is not rendered.

[Previous](/blocks/app/auth-signin)

[Next](/blocks/app/billing-invoices)
