For the complete documentation index, see llms.txt. Markdown variants are available by appending .md to any URL or sending an Accept: text/markdown header. An agent skill is available at /.well-known/agent-skills/site-skill.md.
FrakmentFrakment

Signup Form

Account creation layouts assembled from Frakment primitives.

Create an account
Enter your information below to create your account

We'll use this to contact you. We will not share your email with anyone else.

Must be at least 8 characters long.

Please confirm your password.

Already have an account? Sign in

signup-form-basic.tsx
"use client";

import { Button } from "@/components/ui/button";
import {
  Card,
  CardContent,
  CardDescription,
  CardHeader,
  CardTitle,
} from "@/components/ui/card";
import {
  Field,
  FieldDescription,
  FieldGroup,
  FieldLabel,
} from "@/components/ui/field";
import { Input } from "@/components/ui/input";
import { cn } from "@/lib/utils";

export function SignupFormBasic({
  className,
  ...props
}: React.ComponentProps<typeof Card>) {
  return (
    <Card className={cn("mx-auto w-full max-w-sm", className)} {...props}>
      <CardHeader>
        <CardTitle>Create an account</CardTitle>
        <CardDescription>
          Enter your information below to create your account
        </CardDescription>
      </CardHeader>
      <CardContent>
        <form onSubmit={(event) => event.preventDefault()}>
          <FieldGroup>
            <Field>
              <FieldLabel htmlFor="signup-basic-name">Full Name</FieldLabel>
              <Input
                autoComplete="name"
                id="signup-basic-name"
                placeholder="John Doe"
                required
                type="text"
              />
            </Field>
            <Field>
              <FieldLabel htmlFor="signup-basic-email">Email</FieldLabel>
              <Input
                autoComplete="email"
                id="signup-basic-email"
                placeholder="m@example.com"
                required
                type="email"
              />
              <FieldDescription>
                We&apos;ll use this to contact you. We will not share your email
                with anyone else.
              </FieldDescription>
            </Field>
            <Field>
              <FieldLabel htmlFor="signup-basic-password">Password</FieldLabel>
              <Input
                autoComplete="new-password"
                id="signup-basic-password"
                required
                type="password"
              />
              <FieldDescription>
                Must be at least 8 characters long.
              </FieldDescription>
            </Field>
            <Field>
              <FieldLabel htmlFor="signup-basic-confirm-password">
                Confirm Password
              </FieldLabel>
              <Input
                autoComplete="new-password"
                id="signup-basic-confirm-password"
                required
                type="password"
              />
              <FieldDescription>Please confirm your password.</FieldDescription>
            </Field>
            <Field>
              <Button type="submit">Create Account</Button>
              <Button type="button" variant="outline">
                Sign up with Google
              </Button>
              <FieldDescription className="px-6 text-center">
                Already have an account? <a href="#">Sign in</a>
              </FieldDescription>
            </Field>
          </FieldGroup>
        </form>
      </CardContent>
    </Card>
  );
}

A signup form combines Frakment's button, card, field, and input primitives into account creation layouts.

The examples include a basic form, a two-column password layout, and a branded form with social sign-in actions.

These are copyable layouts, not a standalone registry item, and they do not implement authentication or application-specific validation.

Installation

Usage

Use the primitives to build the form and connect submission to your account creation flow.

signup-form.tsx
import { Button } from "@/components/ui/button";
import {
  Card,
  CardContent,
  CardHeader,
  CardTitle,
} from "@/components/ui/card";
import { Field, FieldGroup, FieldLabel } from "@/components/ui/field";
import { Input } from "@/components/ui/input";
 
export function SignupForm() {
  return (
    <Card>
      <CardHeader>
        <CardTitle>Create an account</CardTitle>
      </CardHeader>
      <CardContent>
        <form>
          <FieldGroup>
            <Field>
              <FieldLabel htmlFor="name">Full Name</FieldLabel>
              <Input id="name" type="text" autoComplete="name" required />
            </Field>
            <Field>
              <FieldLabel htmlFor="email">Email</FieldLabel>
              <Input id="email" type="email" autoComplete="email" required />
            </Field>
            <Field>
              <FieldLabel htmlFor="password">Password</FieldLabel>
              <Input
                id="password"
                type="password"
                autoComplete="new-password"
                required
              />
            </Field>
            <Field>
              <Button type="submit">Create Account</Button>
            </Field>
          </FieldGroup>
        </form>
      </CardContent>
    </Card>
  );
}

Anatomy

The basic layout groups account fields and the submit action inside a card.

Card
├── CardHeader
└── CardContent
    └── form
        └── FieldGroup
            ├── Field (name)
            ├── Field (email)
            ├── Field (password)
            └── Field (submit action)

The social layout adds a two-column password group, while the branded layout adds a brand mark, social actions, and terms text.

Examples

Social

This layout places name and email fields above a two-column password group.

Create your account
Enter your information below to create your account

Must be at least 8 characters long.

Already have an account? Sign in

By clicking continue, you agree to our Terms of Service and Privacy Policy.

signup-form-social.tsx
"use client";

import { Button } from "@/components/ui/button";
import {
  Card,
  CardContent,
  CardDescription,
  CardHeader,
  CardTitle,
} from "@/components/ui/card";
import {
  Field,
  FieldDescription,
  FieldGroup,
  FieldLabel,
} from "@/components/ui/field";
import { Input } from "@/components/ui/input";
import { cn } from "@/lib/utils";

export function SignupFormSocial({
  className,
  ...props
}: React.ComponentProps<"div">) {
  return (
    <div
      className={cn("mx-auto flex w-full max-w-sm flex-col gap-6", className)}
      {...props}
    >
      <Card>
        <CardHeader className="text-center">
          <CardTitle className="text-xl">Create your account</CardTitle>
          <CardDescription>
            Enter your information below to create your account
          </CardDescription>
        </CardHeader>
        <CardContent>
          <form onSubmit={(event) => event.preventDefault()}>
            <FieldGroup>
              <Field>
                <FieldLabel htmlFor="signup-social-name">Full Name</FieldLabel>
                <Input
                  autoComplete="name"
                  id="signup-social-name"
                  placeholder="John Doe"
                  required
                  type="text"
                />
              </Field>
              <Field>
                <FieldLabel htmlFor="signup-social-email">Email</FieldLabel>
                <Input
                  autoComplete="email"
                  id="signup-social-email"
                  placeholder="m@example.com"
                  required
                  type="email"
                />
              </Field>
              <div className="grid gap-4">
                <div className="grid grid-cols-2 gap-4">
                  <Field>
                    <FieldLabel htmlFor="signup-social-password">
                      Password
                    </FieldLabel>
                    <Input
                      autoComplete="new-password"
                      id="signup-social-password"
                      required
                      type="password"
                    />
                  </Field>
                  <Field>
                    <FieldLabel htmlFor="signup-social-confirm-password">
                      Confirm Password
                    </FieldLabel>
                    <Input
                      autoComplete="new-password"
                      id="signup-social-confirm-password"
                      required
                      type="password"
                    />
                  </Field>
                </div>
                <FieldDescription>
                  Must be at least 8 characters long.
                </FieldDescription>
              </div>
              <Field>
                <Button type="submit">Create Account</Button>
                <FieldDescription className="text-center">
                  Already have an account? <a href="#">Sign in</a>
                </FieldDescription>
              </Field>
            </FieldGroup>
          </form>
        </CardContent>
      </Card>
      <FieldDescription className="px-6 text-center">
        By clicking continue, you agree to our <a href="#">Terms of Service</a>{" "}
        and <a href="#">Privacy Policy</a>.
      </FieldDescription>
    </div>
  );
}

Branded

This layout combines a brand mark, an email field, and Apple and Google signup actions.

Acme Inc.

Welcome to Acme Inc.

Already have an account? Sign in

Or

By clicking continue, you agree to our Terms of Service and Privacy Policy.

signup-form-branded.tsx
"use client";

import { GalleryVerticalEnd } from "lucide-react";
import { Button } from "@/components/ui/button";
import {
  Field,
  FieldDescription,
  FieldGroup,
  FieldLabel,
  FieldSeparator,
} from "@/components/ui/field";
import { Input } from "@/components/ui/input";
import { cn } from "@/lib/utils";

function AppleMark() {
  return (
    <svg aria-hidden="true" className="size-4" viewBox="0 0 24 24">
      <path
        d="M12.152 6.896c-.948 0-2.415-1.078-3.96-1.04-2.04.027-3.91 1.183-4.961 3.014-2.117 3.675-.546 9.103 1.519 12.09 1.013 1.454 2.208 3.09 3.792 3.039 1.52-.065 2.09-.987 3.935-.987 1.831 0 2.35.987 3.96.948 1.637-.026 2.676-1.48 3.676-2.948 1.156-1.688 1.636-3.325 1.662-3.415-.039-.013-3.182-1.221-3.22-4.857-.026-3.04 2.48-4.494 2.597-4.559-1.429-2.09-3.623-2.324-4.39-2.376-2-.156-3.675 1.09-4.61 1.09zM15.53 3.83c.843-1.012 1.4-2.427 1.245-3.83-1.207.052-2.662.805-3.532 1.818-.78.896-1.454 2.338-1.273 3.714 1.338.104 2.715-.688 3.559-1.701"
        fill="currentColor"
      />
    </svg>
  );
}

function GoogleMark() {
  return (
    <svg aria-hidden="true" className="size-4" viewBox="0 0 24 24">
      <path
        d="M12.48 10.92v3.28h7.84c-.24 1.84-.853 3.187-1.787 4.133-1.147 1.147-2.933 2.4-6.053 2.4-4.827 0-8.6-3.893-8.6-8.72s3.773-8.72 8.6-8.72c2.6 0 4.507 1.027 5.907 2.347l2.307-2.307C18.747 1.44 16.133 0 12.48 0 5.867 0 .307 5.387.307 12s5.56 12 12.173 12c3.573 0 6.267-1.173 8.373-3.36 2.16-2.16 2.84-5.213 2.84-7.667 0-.76-.053-1.467-.173-2.053H12.48z"
        fill="currentColor"
      />
    </svg>
  );
}

export function SignupFormBranded({
  className,
  ...props
}: React.ComponentProps<"div">) {
  return (
    <div
      className={cn("mx-auto flex w-full max-w-sm flex-col gap-6", className)}
      {...props}
    >
      <form onSubmit={(event) => event.preventDefault()}>
        <FieldGroup>
          <div className="flex flex-col items-center gap-2 text-center">
            <a
              className="flex flex-col items-center gap-2 font-medium"
              href="#"
            >
              <div className="flex size-8 items-center justify-center rounded-md">
                <GalleryVerticalEnd aria-hidden="true" className="size-6" />
              </div>
              <span className="sr-only">Acme Inc.</span>
            </a>
            <h1 className="text-xl font-bold">Welcome to Acme Inc.</h1>
            <FieldDescription>
              Already have an account? <a href="#">Sign in</a>
            </FieldDescription>
          </div>
          <Field>
            <FieldLabel htmlFor="signup-branded-email">Email</FieldLabel>
            <Input
              autoComplete="email"
              id="signup-branded-email"
              placeholder="m@example.com"
              required
              type="email"
            />
          </Field>
          <Field>
            <Button type="submit">Create Account</Button>
          </Field>
          <FieldSeparator>Or</FieldSeparator>
          <Field className="grid gap-4 sm:grid-cols-2">
            <Button type="button" variant="outline">
              <AppleMark />
              Continue with Apple
            </Button>
            <Button type="button" variant="outline">
              <GoogleMark />
              Continue with Google
            </Button>
          </Field>
        </FieldGroup>
      </form>
      <FieldDescription className="px-6 text-center">
        By clicking continue, you agree to our <a href="#">Terms of Service</a>{" "}
        and <a href="#">Privacy Policy</a>.
      </FieldDescription>
    </div>
  );
}

The branded example uses GalleryVerticalEnd from lucide-react, which is installed during Frakment setup.

API

SignupFormBasic accepts and forwards React.ComponentProps<typeof Card>.

SignupFormSocial and SignupFormBranded accept and forward React.ComponentProps<"div">.

className is merged with the default layout classes in all three examples.

Accessibility

  • Give every input a matching FieldLabel and id, and use the appropriate autocomplete value for each field.
  • For invalid fields, set data-invalid on Field, set aria-invalid on the control, and render FieldError for the validation message.
  • Connect form submission and social sign-in buttons to real authentication handlers before using the layouts in an application.

Best Practices

  • Use the examples as layout starting points. Add the validation and account creation behavior required by your application.
  • Replace placeholder links. Sign-in, Terms of Service, and Privacy Policy links in the examples use href="#".
  • Keep the primary action clear. Use one primary submit button for the form.
  • Button — form and social sign-in actions.
  • Card — groups the form content.
  • Field — labels, descriptions, and validation states.
  • Input — account information controls.