Full-height security question setup with a question select and an answer field, plus a skip option. Perfect for account recovery setup and identity verification fallbacks.
A full-height centered card that lets a user set a security question for account recovery: an optional circular icon, heading, and description sit above a bordered card holding a Select of security questions, a free-text answer Input, and a submit Button, with an optional skip prompt link below.
Pro blocks install through the shadcn CLI with your license key and ship their full source. Docs and live previews stay open to everyone, so you can read every block's details first.
Swap YOUR_EMAIL and YOUR_KEY for the email and license key on your account. Find your license key on your account page.
Radix flavor
npx shadcn add "https://ui.beste.co/r/auth48?email=YOUR_EMAIL&license_key=YOUR_KEY"Base UI flavor
npx shadcn add "https://ui.beste.co/r-base/auth48?email=YOUR_EMAIL&license_key=YOUR_KEY"This installs the block to components/beste/block/auth48.tsx, plus the button, input, select, and field shadcn/ui primitives it uses for the submit action, the answer entry, the question dropdown, and the labeled field layout.
The installed file exports auth48Demo alongside the block: the exact props behind the preview above. Spread it to get a working security question form in one line.
import { Auth48, auth48Demo } from "@/components/beste/block/auth48";
export default function SecurityQuestionPage() {
return <Auth48 {...auth48Demo} />;
}Then replace the demo with your own props. Written out, a trimmed setup looks like this:
import { ShieldQuestion } from "lucide-react";
import { Auth48 } from "@/components/beste/block/auth48";
export default function SecurityQuestionPage() {
return (
<Auth48
icon={<ShieldQuestion className="size-6" />}
heading="Set a security question"
description="We'll use this to verify your identity if you ever get locked out."
questions={[
{ value: "pet", label: "What was the name of your first pet?" },
{ value: "city", label: "In what city were you born?" },
]}
defaultQuestion="pet"
labels={{
question: "Security question",
answer: "Your answer",
submit: "Save security question",
}}
skipPrompt={{ text: "Set this up later?", linkLabel: "Skip for now", href: "/dashboard" }}
/>
);
}| Prop | Type | Default | Description |
|---|---|---|---|
icon | React.ReactNode | – | Optional glyph shown in the circular badge above the heading |
heading | string | – | Centered page heading, rendered as an <h1> |
description | string | – | Muted supporting line under the heading |
questions | SecurityQuestion[] | [] | Options rendered inside the question Select |
defaultQuestion | string | – | Initial selected question value, seeds internal state |
labels | { question?: string; questionPlaceholder?: string; answer?: string; answerPlaceholder?: string; submit?: string } | {} | Field labels, placeholders, and submit button text |
skipPrompt | { text: string; linkLabel: string; href: string } | – | Optional skip line and link rendered below the card |
className | string | – | Extra classes for the outer <section> |
type SecurityQuestion = {
value: string;
label: string;
};useState seeded from defaultQuestion; there is no onChange/onValueChange callback exposed, so the current selection is never lifted out of the component.Input is fully uncontrolled: its value is never read into state or forwarded anywhere, so whatever the user types is discarded on submit.<form> onSubmit only calls e.preventDefault(); there is no submit handler prop, so wiring the actual save request is left entirely to the integrator.icon, heading, description, and every labels sub-field (question label, answer label, submit) is conditionally rendered, so omitting one drops it from the layout rather than showing an empty slot.Button is only rendered when labels.submit is set, and it is always enabled (no dirty/valid gating).useId-derived fieldId, so accessibility linking works even with multiple instances on a page.skipPrompt renders through a next/link Link, and the whole prompt paragraph is omitted when the prop is absent.Wiring the form up
This block ships the form markup only; state, validation, and submit are yours to add. Our guide wires the shadcn Field primitives to React Hook Form, TanStack Form, and Formisch on one field system.
auth47
Full-height account recovery screen with a numbered grid of word inputs and paste-to-fill support, plus a restore button that unlocks once every word is entered. Perfect for seed phrase and recovery-phrase restore flows.
auth24
Full-height profile setup step with an avatar uploader, a display name field, and a bio textarea, plus a skip option. Perfect for the post-sign-up onboarding step where users personalize their account.
auth5
Full-height reset-password screen with new and confirm password fields (each with a show/hide toggle) and a live requirements checklist that ticks off rules as the user types. Perfect for the final step of a password reset or invite flow.
auth46
Full-height step-up authentication screen that re-asks for the password before a sensitive action, showing the signed-in account and a cancel option. Perfect for protecting billing, security, and destructive actions.
auth39
Full-height security setup step where the user picks a two-factor method from selectable cards (authenticator app, SMS, or security key), with a skip option. Perfect for guiding users through enabling 2FA.
auth4
Full-height password recovery screen with a centered icon, single email field built on the shadcn Field primitives, a send-reset-link button, and a back-to-sign-in link. Perfect for the first step of any password reset flow.