verify.tsx
import { OtpInput } from "@/components/ui/otp-input";
export function Verify() {
const [code, setCode] = useState(""); // typed digits land here
if (!code) return null;
return <OtpInput length={6} value={code} onChange={setCode} />;
}

Code Block

Framed code with line numbers and copy, no highlighter needed.

General
verify.tsx
import { OtpInput } from "@/components/ui/otp-input";
export function Verify() {
const [code, setCode] = useState(""); // typed digits land here
if (!code) return null;
return <OtpInput length={6} value={code} onChange={setCode} />;
}

Installation

bash
npx shadcn@latest add https://ui.noicess.fun/r/code-block.json

Props

PropTypeDefaultDescription
codestring-The source to display.
languagestring"tsx"Shown in the header when no filename is given.
filenamestring-File name shown in the header bar.
showLineNumbersbooleantrueGutter with right-aligned line numbers.
classNamestring-Additional classes merged with the frame.