TBX Docs
Exercises

Common patterns

Shared behavior across all exercises

All exercises share these patterns:

Labels

Optional overrides for button text, results display, and validator metadata. Supported keys vary by component:

  • YesNo: true, false (Yes/No buttons), check, reset, results
  • Crosswords: across, down for direction labels
  • GroupItems: Group ids from entries for zone headings
  • Others: check, reset, results (e.g. "correct" in "X / Y correct")

checkOn

  • "manual" (default) — Shows Check/Reset buttons. User validates when ready.
  • "auto" — Validates as soon as answers are provided. No Check button.

classNames

Object to customize CSS classes for styling individual parts. Each component documents its supported keys (e.g. root, list, item, buttons, checkButton, resetButton, result).

ExerciseGroup integration

All exercises integrate with ExerciseGroup and ExerciseResults for grouped scoring. Wrap multiple exercises in <ExerciseGroup> to get aggregated correct / total counts.

On this page