Staaarter

Security Question Setup

Full-height security-question setup screen: a native select of preset questions, an answer input below it, and Skip and Continue buttons for finishing or deferring the step.

By Staaarter Team
Auth
Docs
Live preview

Docs

Installation

A real shadcn registry command, not a copy-paste stand-in: it fetches this block plus its button dependencies and any missing npm packages, and installs them straight into your project.

npx shadcn add https://staaarter.com/r/security-question-setup.json

Prefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/auth/auth48.tsx instead.

Usage

The file also exports auth48Demo, the exact props behind the preview above. Spread it to get a working section in one line, then replace it with your own data.

import { Auth48, auth48Demo } from "@/components/blocks/auth/auth48";

export default function Page() {
  return <Auth48 {...auth48Demo} />;
}

Props

PropTypeDefaultDescription
headingReactNodenoneMain heading above the form.
descriptionstringundefinedSupporting copy under the heading.
questionsstring[]nonePreset security questions listed in the select.
answerLabelstringnoneLabel for the answer field.
answerPlaceholderstringundefinedPlaceholder text for the answer input.
skipLabelstringnoneLabel for the skip button.
continueLabelstringnoneLabel for the continue button.
classNamestringnoneExtra classes for the outer section element.

Behavior notes

  • Static server component; a native <select> does not need client-side JavaScript to be interactive, so no "use client" is required.
  • Both Skip and Continue are left inert, no real submit handler or navigation, since persisting the chosen question/answer or skipping the step both require a backend.