# Marketing Hero Form: Two Factor Verification

A hero with a two factor verification form for a one time security code. Confirms identity during signin to keep new accounts safe and secure.

- Page: https://www.shadcn-ui-blocks.com/blocks/marketing/hero-forms/two-factor-verification
- Collection: [Marketing](https://www.shadcn-ui-blocks.com/blocks/marketing), Free tier
- Group: [Hero Forms](https://www.shadcn-ui-blocks.com/blocks/marketing/hero-forms)
- Created: 2026-06-14
- Preview image: https://www.shadcn-ui-blocks.com/blocks/marketing/hero-forms/two-factor-verification.png

## Install

```bash
npx shadcn@latest add @shadcn-ui-blocks/marketing-hero-forms-two-factor-verification
```

A free block: it installs with no account or key. Or install it by URL: `npx shadcn@latest add "https://www.shadcn-ui-blocks.com/r/marketing-hero-forms-two-factor-verification.json"`.

## Depends on

- npm packages: class-variance-authority, lucide-react, radix-ui
- shadcn/ui components: button, input
- Installs to: `@/components/blocks/marketing/hero-forms/two-factor-verification`

## About this block

Two Factor Verification is a centered, full viewport hero built around a
three-step authentication flow. A lock icon sits above the heading, and
below that a card holds the active step. In step one, three selectable
rows let the visitor pick a delivery method: SMS, email, or an
authenticator app, each row carrying an icon, a label, and a short
description. In step two the card swaps to a row of six single-character
inputs that advance focus automatically as each digit is typed, plus a
resend link and a back button. Once all six digits are filled the Verify
button activates and, on success, the card transitions to a confirmation
state with a green check icon and a button to continue.

The heading, subtext, and delivery method labels are all plain copy you
can rewrite. You can remove any of the three method rows if your product
only supports one channel, or reorder them to promote the preferred
option first. The success state copy and the destination of the continue
button are likewise independent of the verification logic.

## When to use

Reach for this block when a learner or account holder has just created
a credential and needs to prove ownership before accessing protected
content. On an online education platform it fits neatly as the gate
between signup and the student dashboard, making it clear that the extra
step protects their progress and payment records rather than simply
slowing them down. It is better suited to this enrollment moment than a
generic sign-up hero because it presents the security step as a positive
confirmation rather than an obstacle.

A natural flow around it on a Marketing (Legacy) page:

**Before**

- A [Sign Up Form](https://www.shadcn-ui-blocks.com/blocks/marketing/hero-forms/sign-up-form) to collect
  the initial email and password before handing off to verification
- A [Free Trial Signup Form](https://www.shadcn-ui-blocks.com/blocks/marketing/hero-forms/free-trial-signup-form)
  when the account is created through a trial rather than a direct purchase

**After**

- A [Feature Sections](https://www.shadcn-ui-blocks.com/blocks/marketing/feature-sections) block to
  confirm what the learner now has access to once their account is secured
- A [CTA Sections](https://www.shadcn-ui-blocks.com/blocks/marketing/cta-sections) block to prompt the
  next action, such as completing a profile or starting the first course

## What you can customize

The block has three distinct states that each render different card
content; you can tailor each one independently:

- **Method selection labels.** Rewrite the title and description on each
  delivery row to match the exact channels your auth provider supports,
  or remove rows to show only the options you offer.
- **Code input length.** The six input slots match a standard OTP length;
  adjust the array and grid to fit a four or eight digit code if your
  backend issues a different length.
- **Success destination.** The "Continue to Dashboard" button in the
  confirmed state points wherever you route newly verified users, so swap
  the label and handler to match your post-auth redirect.

> Tip: if your platform only offers one delivery method, skip the first
> step entirely and render the code input directly so learners reach
> their course faster.

## More in Marketing Hero Forms

- [Booking Form](https://www.shadcn-ui-blocks.com/blocks/marketing/hero-forms/booking-form)
- [Center Aligned Search With Tags](https://www.shadcn-ui-blocks.com/blocks/marketing/hero-forms/center-aligned-search-with-tags)
- [Center Aligned With A Form](https://www.shadcn-ui-blocks.com/blocks/marketing/hero-forms/center-aligned-with-a-form)
- [Contact Form With Background](https://www.shadcn-ui-blocks.com/blocks/marketing/hero-forms/contact-form-with-background)
- [Contest Entry Form](https://www.shadcn-ui-blocks.com/blocks/marketing/hero-forms/contest-entry-form)
- [Early Access Form](https://www.shadcn-ui-blocks.com/blocks/marketing/hero-forms/early-access-form)
- [Event Registration Countdown](https://www.shadcn-ui-blocks.com/blocks/marketing/hero-forms/event-registration-countdown)
- [Feedback Survey Form](https://www.shadcn-ui-blocks.com/blocks/marketing/hero-forms/feedback-survey-form)
- [Floating Card With Gradient](https://www.shadcn-ui-blocks.com/blocks/marketing/hero-forms/floating-card-with-gradient)
- [Free Ebook Form](https://www.shadcn-ui-blocks.com/blocks/marketing/hero-forms/free-ebook-form)
- [Free Trial Signup Form](https://www.shadcn-ui-blocks.com/blocks/marketing/hero-forms/free-trial-signup-form)
- [Image And Form](https://www.shadcn-ui-blocks.com/blocks/marketing/hero-forms/image-and-form)
- [Job Application Form](https://www.shadcn-ui-blocks.com/blocks/marketing/hero-forms/job-application-form)
- [Newsletter Subscription](https://www.shadcn-ui-blocks.com/blocks/marketing/hero-forms/newsletter-subscription)
- [Newsletter With Social Proof](https://www.shadcn-ui-blocks.com/blocks/marketing/hero-forms/newsletter-with-social-proof)
- [Product Customizer Form](https://www.shadcn-ui-blocks.com/blocks/marketing/hero-forms/product-customizer-form)
- [Quiz Assessment Form](https://www.shadcn-ui-blocks.com/blocks/marketing/hero-forms/quiz-assessment-form)
- [Schedule Demo Form](https://www.shadcn-ui-blocks.com/blocks/marketing/hero-forms/schedule-demo-form)
- [Sign Up Form](https://www.shadcn-ui-blocks.com/blocks/marketing/hero-forms/sign-up-form)
- [Split Screen Multi Step](https://www.shadcn-ui-blocks.com/blocks/marketing/hero-forms/split-screen-multi-step)
- [Subscription Form With Toggle](https://www.shadcn-ui-blocks.com/blocks/marketing/hero-forms/subscription-form-with-toggle)
- [User Feedback Form](https://www.shadcn-ui-blocks.com/blocks/marketing/hero-forms/user-feedback-form)
- [Webinar Registration Form](https://www.shadcn-ui-blocks.com/blocks/marketing/hero-forms/webinar-registration-form)
