Brickslab.Toolsv2.1.1

@brickslab./ui-webQuiz

Standardized question wrapper with label, required indicator, points badge, status border, and error/hint messaging.

Statuses

What is your role?*
5 pts
— input here —
Rate your experience
— input here —
Select a value from 1 to 5.
Describe an issue
— input here —
This field is required.
Optional feedback
Share any additional thoughts.
— input here —

Props

PropTypeDéfautRequisDescription
idstringUnique identifier; used for aria-labelledby.
labelstringThe question label shown as a heading.
descriptionstringOptional sub-text below the label.
requiredbooleanfalseShows a required asterisk.
pointsnumberPoints badge displayed in the top-right.
status"default" | "success" | "warning" | "error""default"Border color variant indicating answer state.
errorstringError message shown below the children (overrides hint).
hintstringHelper hint shown below the children.
actionsReactNodeExtra controls shown in the top-right (e.g. delete button).
childrenReactNodeThe question input (QuestionRenderer, etc.).
Override rapide

Tous les paramètres listés dans cette table sont overrideables via les props. Utilisez ce squelette comme point de départ.

<MyComponent
  id="..."
  label="..."
  description="..."
  required={false}
  points={0}
  status="default"
  error="..."
  hint="..."
  // +2 autres props disponibles
/>
idlabeldescriptionrequiredpointsstatuserrorhintactionschildren

Usage

tsx
import { QuestionCard } from "@brickslab./ui-web";

<QuestionCard
  id="q-role"
  label="What is your role?"
  required
  points={5}
  hint="Choose the option that best describes you."
>
  {/* QuestionRenderer or custom input */}
</QuestionCard>