TBX Docs
ExercisesCatalogue

PickMulti

Multiple-choice questions with checkboxes

PickMulti lets users select multiple correct options per question. Each row has a question and a list of checkboxes. Multiple choices can be correct.

Import

import { PickMulti } from '@bside-tech/tbx-ui/components';

Example

Pick Multiple
Choose all correct options.
  • Select all programming languages:
<PickMulti
  entries={[
    {
      text: 'Select all programming languages:',
      choices: [
        { label: 'JavaScript', correct: true },
        { label: 'Python', correct: true },
        { label: 'HTML', correct: false },
        { label: 'Rust', correct: true },
      ],
    },
  ]}
/>

Props

Prop

Type

Labels

Override labels via the labels prop. Supported keys: check, reset (action buttons), results (e.g. "correct" in "3 / 5 correct").

<PickMulti
  entries={[...]}
  labels={{
    check: 'Verify',
    reset: 'Reset',
    results: 'correct',
  }}
/>

Style

Tailwind v4 is available for all customisations. Pass classes via the classNames prop, or override CSS variables for fine-grained control.

CSS Classes

KeyElement
rootRoot wrapper
listQuestion list (ul)
itemEach question row (li)
textQuestion text
choicesCheckbox list container
choiceEach choice label
checkboxCheckbox input
checkButtonCheck button
resetButtonReset button
resultResults text

CSS Variables

Scoped under .tbx-pickmulti:

VariablePurpose
--pickmulti-option-bgChoice background (default)
--pickmulti-option-bg-selectedChoice background when selected (before validation). Uses color-mix with --exercise-accent-color.
--pickmulti-option-border-selectedChoice border when selected (before validation). Uses --exercise-accent-color.
--pickmulti-item-borderRow divider
--pickmulti-action-bg, --pickmulti-action-borderCheck/Reset button background and border
--pickmulti-result-neutral, --pickmulti-result-correct, --pickmulti-result-wrongResults text colors (neutral, correct, wrong)
--pickmulti-correct-bg, --pickmulti-correct-borderCorrect answer highlight
--pickmulti-wrong-bg, --pickmulti-wrong-borderWrong answer highlight

These feed into --exercise-action-bg, --exercise-action-border and --exercise-result-* used by ExerciseLayout.

Content inherits --exercise-layout-content-font-size. Checkbox size is 1.25rem with accent-color: var(--exercise-accent-color).

On this page