# V form 9

> Sign Up / Register

A shadcn/ui block from the [@cnippet](https://ui.cnippet.dev/) registry, listed on [shadcn.exchange](https://shadcn.exchange/r/cnippet/v-form-9).

- Page, with a live preview: https://shadcn.exchange/r/cnippet/v-form-9
- Screenshot: https://abzjhwgwpdpz7ua5.public.blob.vercel-storage.com/shots/cnippet/v-form-9-light-ff282a68e43ccfa8.png
- Registry item: https://ui.cnippet.dev/r/v-form-9.json
- Categories: form
- Listed: 2026-10-13, source last changed 2026-10-13

## Install

```bash
npx shadcn@latest add https://ui.cnippet.dev/r/v-form-9.json
```

Run it in a project that has shadcn/ui set up. It adds the files below and installs what they depend on.

## Dependencies

- Registry items: `@cnippet/form`

## Files

### `registry/default/variants/v-form-9.tsx`

```tsx
"use client";

import { type FormEvent, useState } from "react";
import { Button } from "@/registry/default/ui/button";
import { Checkbox } from "@/registry/default/ui/checkbox";
import { Field, FieldError, FieldLabel } from "@/registry/default/ui/field";
import { Form } from "@/registry/default/ui/form";
import { Input } from "@/registry/default/ui/input";
import { Label } from "@/registry/default/ui/label";

export function Pattern() {
  const [loading, setLoading] = useState(false);

  const onSubmit = async (e: FormEvent<HTMLFormElement>) => {
    e.preventDefault();
    setLoading(true);
    await new Promise((r) => setTimeout(r, 900));
    setLoading(false);
  };

  return (
    <div className="w-full max-w-sm space-y-5">
      <div className="space-y-1">
        <h2 className="font-semibold text-lg">Create an account</h2>
        <p className="text-muted-foreground text-sm">
          Fill in the details below to get started.
        </p>
      </div>

      <Form className="gap-4" onSubmit={onSubmit}>
        <Field name="email">
          <FieldLabel>Email</FieldLabel>
          <Input
            autoComplete="email"
            placeholder="you@example.com"
            required
            type="email"
          />
          <FieldError />
        </Field>

        <Field name="password">
          <FieldLabel>Password</FieldLabel>
          <Input
            autoComplete="new-password"
            minLength={8}
            placeholder="At least 8 characters"
            required
            type="password"
          />
          <FieldError />
        </Field>

        <Field name="confirm">
          <FieldLabel>Confirm password</FieldLabel>
          <Input
            autoComplete="new-password"
            placeholder="Re-enter your password"
            required
            type="password"
          />
          <FieldError />
        </Field>

        <Label className="flex items-start gap-2 font-normal text-sm">
          <Checkbox className="mt-0.5" name="terms" required />
          <span className="text-muted-foreground">
            I agree to the{" "}
            <a
              className="text-foreground underline underline-offset-2"
              href="#"
            >
              Terms of Service
            </a>{" "}
            and{" "}
            <a
              className="text-foreground underline underline-offset-2"
              href="#"
            >
              Privacy Policy
            </a>
          </span>
        </Label>

        <Button className="w-full" loading={loading} type="submit">
          Create account
        </Button>
      </Form>
    </div>
  );
}
```
