Staaarter

Account Type Selection

Full-height onboarding step that presents 2-3 selectable account-type cards, each with an icon, title, and description. Selecting a card highlights it and enables the Continue button, built on real, keyboard-accessible radio inputs rather than fake unlabeled divs.

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/account-type-selection.json

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

Usage

The file also exports auth11Demo, 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 { Auth11, auth11Demo } from "@/components/blocks/auth/auth11";

export default function Page() {
  return <Auth11 {...auth11Demo} />;
}

Props

PropTypeDefaultDescription
headingReactNode"How will you use this?"Screen heading.
descriptionstringundefinedOptional supporting text under the heading.
optionsAccountTypeOption[]noneThe selectable account-type cards, rendered in the order passed in.
classNamestringnoneExtra classes for the outer section element.

Types

type AccountTypeOption = {
  value: string;
  title: string;
  description: string;
};

Behavior notes

  • Card selection is real client state (useState), each card is a real <label> wrapping a visually-hidden (sr-only) <input type="radio" name="account-type">, not a fake div-only toggle, so keyboard and screen-reader users can select an option.
  • No option is selected initially, the "Continue" button stays disabled until the user picks one, it has no onClick handler since continuing would require a real backend.
  • The component supports any number of options, though the brief and demo use three (Personal, Team, Enterprise). Each option's icon is matched by array position from a fixed internal list rather than accepted as a prop, since a component reference can't be passed as a prop from the Server Component that renders this block's live preview.