Attribution Survey

Step 4 of 4

Quick Question

How did you find us?

This helps us understand where our users come from. Pick all that apply.

Skip
About this block

Attribution SurveyPRO

Onboarding screen with a quick survey asking how the user discovered the product, with selectable options and an optional text input. Perfect for marketing attribution during signup.

Onboarding27: Attribution Survey

Single-select "how did you find us" survey grid where choosing "Social media" reveals a row of multi-select platform chips, choosing "Other" reveals a free-text input, and submitting swaps the whole section for a check-icon thank-you screen.

Upgrade to Pro

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.

Upgrade Now

Installation

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

bash
npx shadcn add "https://ui.beste.co/r/onboarding27?email=YOUR_EMAIL&license_key=YOUR_KEY"

Base UI flavor

bash
npx shadcn add "https://ui.beste.co/r-base/onboarding27?email=YOUR_EMAIL&license_key=YOUR_KEY"

This installs the block to components/beste/block/onboarding27.tsx and the badge, button, and input shadcn/ui primitives it depends on.

Quick start

The installed file exports onboarding27Demo alongside the block: the exact props behind the preview above. Spread it to get a working survey in one line.

tsx
import { Onboarding27, onboarding27Demo } from "@/components/beste/block/onboarding27";

export default function OnboardingPage() {
  return <Onboarding27 {...onboarding27Demo} />;
}

Then replace the demo with your own props. Written out, a trimmed setup looks like this:

tsx
import { Onboarding27 } from "@/components/beste/block/onboarding27";

export default function OnboardingPage() {
  return (
    <Onboarding27
      badge={{ label: "Quick Question", variant: "secondary" }}
      heading="How did you find us?"
      description="This helps us understand where our users come from."
      options={[
        { id: "search", label: "Google search" },
        {
          id: "social",
          label: "Social media",
          children: [
            { id: "social-x", label: "X (Twitter)" },
            { id: "social-linkedin", label: "LinkedIn" },
          ],
        },
        { id: "other", label: "Other", hasInput: true, inputPlaceholder: "Tell us more..." },
      ]}
      primaryButton={{ label: "Submit & Continue", href: "/setup/next" }}
      secondaryButton={{ label: "Skip", href: "/dashboard" }}
    />
  );
}

Props

PropTypeDefaultDescription
badge{ label: string; variant?: "default" | "secondary" | "outline" }Small badge above the heading
headingstringMain headline
descriptionstringSupporting copy below the heading
optionsSurveyOption[][]Survey answer options, 2-column grid
primaryButton{ label: string; href: string }Submit CTA, disabled until an option is selected
secondaryButton{ label: string; href: string }Skip CTA link, always enabled
labels{ stepOf?: string; thankYou?: string }Step template and the post-submit thank-you heading
currentStepnumber1Current step number, used only to fill the step-of label
totalStepsnumber4Total step count, used only to fill the step-of label
classNamestringExtra classes for the outer <section>
ts
type SurveyOption = {
  id: string;
  label: string;
  hasInput?: boolean;
  inputPlaceholder?: string;
  children?: { id: string; label: string }[];
};

Behavior notes

  • Selecting an option is single-select and toggles off if you click the already-selected option again (selected === id ? null : id); switching to a different top-level option also clears any selected children via setSelectedChildren(new Set()).
  • Options with children (like "Social media" in the demo) only reveal their pill-style multi-select chips once the parent option itself is selected; the children live in a separate Set<string> state (selectedChildren) tracked independently from the parent's single selection.
  • Options with hasInput reveal a shadcn Input when selected, but the input is uncontrolled: nothing wires its value into component state, so a free-text answer typed there isn't actually captured anywhere before submit.
  • primaryButton is disabled until selected is set. Clicking it doesn't navigate; it flips a local submitted boolean that replaces the entire section with a check-icon "thank you" screen using labels.thankYou. That screen's own button is hardcoded to the text "Continue" (it ignores primaryButton.label) but still uses primaryButton.href.
  • Options that carry children or hasInput span both columns of the 2-column options grid (col-span-2); plain options stay single-column.

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.

More Onboarding blocks

View all Onboarding
PRO

onboarding20

Template Starter Picker

Onboarding screen with a grid of starter templates to choose from, each with a preview thumbnail, title, and description. Perfect for project creation flows in design tools and project management apps.

PRO

onboarding16

Interest Tag Picker

Onboarding screen with a grid of selectable interest tags and chips for personalizing content recommendations. Perfect for content platforms, newsletters, and social apps.

PRO

onboarding29

Company Info Form

Onboarding screen for collecting company information including name, team size selector chips, and industry dropdown. Perfect for B2B SaaS apps that need organizational context during setup.

PRO

onboarding18

Notification Preferences

Onboarding screen with toggle switches for configuring notification channels and frequency. Perfect for apps that need granular notification consent during setup.

PRO

onboarding24

Keyboard Shortcuts Cheat Sheet

Onboarding screen displaying essential keyboard shortcuts in a grouped grid layout with key badges. Perfect for productivity tools that want to accelerate user adoption.

PRO

onboarding17

Goal Selector with Paths

Onboarding screen where users pick their primary goal to receive a tailored onboarding path. Each goal card shows a recommended feature set. Perfect for multi-purpose platforms.