shadcn.io is an independent project built on shadcn/ui
The heading is Confirm Transaction, with a line about sending $1,250.00 to John Doe. A Security Check alert sits above six boxes, then Cancel and Confirm Transaction.
Ask for the code before money moves. If the step should block the rest of the app, put it in a Dialog. In Solid, Ark UI does not verify the code.
Installation
Anatomy

Usage
<div class="flex w-full max-w-sm flex-col gap-6">
<div class="flex flex-col gap-2 text-center">
<h2 class="font-semibold text-2xl">Confirm Transaction</h2>
<p class="text-muted-foreground text-sm">
You’re about to send $1,250.00 to John Doe
</p>
</div>
<Alert>
<TriangleAlertIcon aria-hidden="true" />
<AlertTitle>Security Check</AlertTitle>
<AlertDescription>
For your security, please enter the confirmation code sent to your
registered email address.
</AlertDescription>
</Alert>
<form class="flex flex-col gap-6" onSubmit={handleSubmit}>
<Field invalid={error() !== ""}>
<FieldLabel class="sr-only">Confirmation code</FieldLabel>
<div class="flex justify-center">
<InputOTP onValueChange={handleValueChange} value={value()}>
<InputOTPGroup>
<InputOTPSlot class="bg-background" index={0} />
<InputOTPSlot class="bg-background" index={1} />
<InputOTPSlot class="bg-background" index={2} />
</InputOTPGroup>
<InputOTPSeparator />
<InputOTPGroup>
<InputOTPSlot class="bg-background" index={3} />
<InputOTPSlot class="bg-background" index={4} />
<InputOTPSlot class="bg-background" index={5} />
</InputOTPGroup>
{/* The rest of the file is under Installation. */}FAQ
How is the security notice built?
An Alert with a TriangleAlertIcon, an AlertTitle reading Security Check and an AlertDescription that says where the code was sent.
How are the two buttons laid out?
In a row with gap-2, each flex-1 so they share the width: an outline Cancel of type button and a Confirm Transaction submit button.
What does Confirm Transaction do?
With a full code, it disables itself and reads Confirming... while a timer stands in for the request, then reports success. A short code shows Confirmation code must be 6 characters. in FieldError.
What does Cancel do?
It clears the code and any error and reports Transaction cancelled. In your app, close the dialog or go back.
API Reference
Alert
No extra props in this demo. The rest is on the Alert page.
Field
Sets invalid={error() !== ""}. The rest is on the Field page.
Input OTP
Sets onValueChange={handleValueChange}, value={value()}, index={0}, index={1}, index={2} and index={3}. The rest is on the Input OTP page.
Button
Sets onClick={handleCancel}, type="button", variant="outline", disabled={isConfirming()} and type="submit". The rest is on the Button page.





