One-time code
Boxes for a code sent by text or email, one digit in each.
Add it to your project
Or install the packages yourselfTerminal
npm install @heroui/react
First time with HeroUI? Set it up once.
The code
*/
import {InputOTP, Label, Link} from "@heroui/react";
export default function InputOtpDemo() {
return (
<div className="flex w-[280px] flex-col gap-2">
<div className="flex flex-col gap-1">
<Label>Verify account</Label>
<p className="text-sm text-muted">We've sent a code to a****@gmail.com</p>
</div>
<InputOTP maxLength={6}>
<InputOTP.Group>This comes with paid plans
The code for every component comes with paid plans, along with the rest of the AI toolkit. The first component under each heading is free.
Changed for this site: A default export (HeroUI's docs use named ones).