BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/fluid-functionalism/ask-user-questions

Ask User Questions

fluid-functionalism/ask-user-questions
FreeComponent

Stepped question flow with numbered options, keyboard shortcuts (1–9), single or multi-select, inline 'other' text input, optional skip, proximity-based hover, and multi-question navigation. Auto-advances on selection in single-select.

Install it

npx shadcn@latest add https://fluidfunctionalism.com/r/ask-user-questions.json

Source

registry/default/ask-user-questions.tsxfluidfunctionalism.com/r/ask-user-questions.json · first 6 KB
1"use client";
2
3import {
4 forwardRef,
5 useCallback,
6 useEffect,
7 useId,
8 useMemo,
9 useRef,
10 useState,
11 type HTMLAttributes,
12 type KeyboardEvent as ReactKeyboardEvent,
13} from "react";
14import { AnimatePresence, motion } from "framer-motion";
15import { RadioGroup as RadioGroupPrimitive } from "@base-ui/react/radio-group";
16import { Radio as RadioPrimitive } from "@base-ui/react/radio";
17import { CheckboxGroup as CheckboxGroupPrimitive } from "@base-ui/react/checkbox-group";
18import { Checkbox as CheckboxPrimitive } from "@base-ui/react/checkbox";
19import { Field } from "@base-ui/react/field";
20import { cn } from "@/lib/utils";
21import { spring } from "@/lib/springs";
22import { fontWeights } from "@/lib/font-weight";
23import { useShape } from "@/lib/shape-context";
24import { useIcon } from "@/lib/icon-context";
25import { useProximityHover } from "@/hooks/use-proximity-hover";
26import { useMergeSplitBlocks, SelectionBackgrounds } from "@/hooks/use-merge-split";
27import { Button } from "@/components/ui/button";
28
29export interface AskUserOption {
30 id?: string;
31 title: string;
32 description?: string;
33}
34
35export interface AskUserQuestion {
36 id?: string;
37 title: string;
38 /** Options to choose from. Optional only because a `freeText` question
39 * has none; every other mode requires at least one. */
40 options?: AskUserOption[];
41 multiSelect?: boolean;
42 allowOther?: boolean;
43 otherPlaceholder?: string;
44 skippable?: boolean;
45 nextLabel?: string;
46 /** Visual layout for each option row.
47 * - "inline" (default): title and description on one line.
48 * - "stacked": title above, description below — useful when descriptions
49 * are long enough to wrap. */
50 layout?: "inline" | "stacked";
51 /** Which side of the row the numbered chip sits on.
52 * - "right" (default): chip on the right; the single-select submit
53 * arrow overlays it on hover/focus.
54 * - "left": chip on the left, before the body. The submit arrow
55 * still appears on the right edge of the row, so the action
56 * affordance stays where the eye expects it.
57 * Works with every other option (single/multi-select, allowOther,
58 * inline/stacked layout). */
59 chipPosition?: "left" | "right";
60 /** Render a single multi-line textarea as the *only* answer, with no
61 * option rows — for open-ended prompts (a name, a description, free
62 * comments). Distinct from `allowOther`, which appends a free-text row
63// … truncated

What it pulls in

npm packages

  • framer-motion
  • @base-ui/react

Other registry items

  • utils
  • https://www.fluidfunctionalism.com/r/springs.json
  • https://www.fluidfunctionalism.com/r/font-weight.json
  • https://www.fluidfunctionalism.com/r/shape-context.json
  • https://www.fluidfunctionalism.com/r/icon-context.json
  • https://www.fluidfunctionalism.com/r/use-proximity-hover.json
  • https://www.fluidfunctionalism.com/r/use-merge-split.json
  • https://www.fluidfunctionalism.com/r/button.json

Files it writes

  • registry/default/ask-user-questions.tsx

Facts

Registry
fluid-functionalism
Type
registry:ui
Access
Free
Files written
1
Licence
MIT
First indexed
2026-08-02
Last confirmed
today

Go to the source

fluidfunctionalism.com mickadesign/fluid-functionalism on GitHub Raw registry item This item as JSON

More from fluid-functionalism

All 53 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
Accordionaccordionfluid-functionalismComponentsFree3 deps
Accordion (Base UI)accordion-basefluid-functionalismComponentsFree3 deps
Badgebadgefluid-functionalismComponentsFree1 dep
Buttonbuttonfluid-functionalismComponentsFree4 deps
Button (Base UI)button-basefluid-functionalismComponentsFree4 deps
Cardcardfluid-functionalismComponentsFree1 dep
Chat Messagechat-messagefluid-functionalismComponentsFree1 dep
Checkbox Groupcheckbox-groupfluid-functionalismComponentsFree2 deps
BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex