---
title: "Verify email with a code"
description: "Kilnwork's check-your-email step: a six-digit code that submits itself, a resend with a cooldown and a link to change the address."
plan: Pro
docs: https://ui.edbn.me/docs/templates/verify-email-code
---

# Verify email with a code

Kilnwork's check-your-email step: a six-digit code that submits itself, a resend with a cooldown and a link to change the address.

The step after the trial sign-up, in one centred column between Kilnwork's header and footer: where the code went and how long it works, six boxes, Verify, a resend that waits 30 seconds between sends, and a link back to change the address. Built on the Pro forms: pasting the code fills every box and the last digit submits it. A wrong or expired code comes back from the sample server as a field error and clears the boxes for the next try; the fifth wrong code returns a form error with when to try again. In the sample, 135790 is right and 975310 has expired. Once verified, the heading and the actions change in place, at the same height, and focus moves to the heading. It opens with four digits typed; sample={false} opens it empty.

A Pro page template built on Base UI and Tailwind CSS v4.

## Installation

This is a Pro item. Once per project, create a token at https://ui.edbn.me/dashboard/tokens, put it in `.env.local` as `EDBN_TOKEN`, and add the registry to `components.json`:

```json
{
  "registries": {
    "@edbn": {
      "url": "https://ui.edbn.me/r/{name}.json",
      "headers": { "Authorization": "Bearer ${EDBN_TOKEN}" }
    }
  }
}
```

Then install:

```bash
npx shadcn@4.19.0 add @edbn/verify-email-code
```

## Dependencies
- npm: zod@^4.3.5
- edbn: edbn-base, button, text-link, form-core, form-otp-field

## Source

The source is part of Pro (https://ui.edbn.me/pricing). The install above adds it to the project, ready to edit.

## More authentication templates

All 10, with install commands: https://ui.edbn.me/docs/templates/authentication (Markdown: https://ui.edbn.me/docs/templates/authentication.md)

## For agents
- Base theme, once per project: npx shadcn@4.19.0 add https://ui.edbn.me/r/edbn-base.json
- MCP server with search, items, examples and source: https://ui.edbn.me/mcp
- Every page and item: https://ui.edbn.me/llms.txt
