# OTP Code

> OTP Code for Reset Password.

A shadcn/ui block from the [@flx](https://ui.flexnative.com) registry, listed on [shadcn.exchange](https://shadcn.exchange/r/flx/reset-password-2).

- Page, with a live preview: https://shadcn.exchange/r/flx/reset-password-2
- Screenshot: https://abzjhwgwpdpz7ua5.public.blob.vercel-storage.com/shots/flx/reset-password-2-light-02a314e560e14ced.png
- Registry item: https://ui.flexnative.com/r/reset-password-2.json
- Listed: 2026-10-13, source last changed 2026-10-13

## Install

```bash
npx shadcn@latest add https://ui.flexnative.com/r/reset-password-2.json
```

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

## Dependencies

- npm packages: `input-otp`, `lucide-react`
- Registry items: `button`, `card`, `input-otp`

## Files

### `registry/intents/auth/reset-password/reset-password-2.tsx`

```tsx
'use client'

import { useState } from 'react'
import { ShieldCheckIcon } from 'lucide-react'

import { Button } from '@/components/ui/button'
import {
  Card,
  CardContent,
  CardFooter,
  CardHeader,
  CardTitle,
} from '@/components/ui/card'
import {
  InputOTP,
  InputOTPGroup,
  InputOTPSlot,
} from '@/components/ui/input-otp'

export function ResetPassword2() {
  const [code, setCode] = useState('')

  return (
    <Card size="sm">
      <CardHeader>
        <div className="bg-primary/10 mb-1 flex size-10 items-center justify-center rounded-full">
          <ShieldCheckIcon className="text-primary size-5" />
        </div>
        <CardTitle>Enter your code</CardTitle>
        <p className="text-muted-foreground text-xs">
          We sent a 6-digit code to{' '}
          <span className="text-foreground font-medium">j•••@acme.com</span>.
          Enter it below to continue.
        </p>
      </CardHeader>

      <CardContent className="flex justify-center">
        <InputOTP maxLength={6} value={code} onChange={setCode}>
          <InputOTPGroup>
            <InputOTPSlot index={0} />
            <InputOTPSlot index={1} />
            <InputOTPSlot index={2} />
            <InputOTPSlot index={3} />
            <InputOTPSlot index={4} />
            <InputOTPSlot index={5} />
          </InputOTPGroup>
        </InputOTP>
      </CardContent>

      <CardFooter className="flex-col items-stretch gap-4">
        <Button className="w-full" disabled={code.length < 6}>
          Verify code
        </Button>
        <p className="text-muted-foreground text-center text-[11px]">
          Didn&apos;t get it?{' '}
          <a href="#" className="text-foreground font-medium hover:underline">
            Resend code
          </a>{' '}
          · expires in 5:00
        </p>
      </CardFooter>
    </Card>
  )
}
```
