OTP Input with Inner Shadow

PreviousNext

An OTP input with inner shadow styling

Docs
shadcnui-blockscomponent

Preview

Loading preview…
components/customized/input-otp/input-otp-07.tsx
import { InputOTP, InputOTPGroup, InputOTPSlot } from "@/registry/ui/input-otp";

export default function InputOTPDemo() {
  return (
    <InputOTP maxLength={6}>
      <InputOTPGroup className="space-x-2">
        <InputOTPSlot
          index={0}
          className="rounded-md border-l border-accent/90 shadow-inner dark:shadow-primary/10"
        />
        <InputOTPSlot
          index={1}
          className="rounded-md border-l border-accent/90 shadow-inner dark:shadow-primary/10"
        />
        <InputOTPSlot
          index={2}
          className="rounded-md border-l border-accent/90 shadow-inner dark:shadow-primary/10"
        />
        <InputOTPSlot
          index={3}
          className="rounded-md border-l border-accent/90 shadow-inner dark:shadow-primary/10"
        />
      </InputOTPGroup>
    </InputOTP>
  );
}

Installation

npx shadcn@latest add @shadcnui-blocks/input-otp-07

Usage

import { InputOtp07 } from "@/components/input-otp-07"
<InputOtp07 />