verify.tsx
import { OtpInput } from "@/components/ui/otp-input";export function Verify() {const [code, setCode] = useState(""); // typed digits land hereif (!code) return null;return <OtpInput length={6} value={code} onChange={setCode} />;}
verify.tsx
import { OtpInput } from "@/components/ui/otp-input";export function Verify() {const [code, setCode] = useState(""); // typed digits land hereif (!code) return null;return <OtpInput length={6} value={code} onChange={setCode} />;}
Installation
bash
npx shadcn@latest add https://ui.noicess.fun/r/code-block.jsonProps
| Prop | Type | Default | Description |
|---|---|---|---|
| code | string | - | The source to display. |
| language | string | "tsx" | Shown in the header when no filename is given. |
| filename | string | - | File name shown in the header bar. |
| showLineNumbers | boolean | true | Gutter with right-aligned line numbers. |
| className | string | - | Additional classes merged with the frame. |