Examples
Concrete components, controlled by a few inputs.
Pick a component, switch between preview and code, and adjust the same compact input contract that Block sends to the canvas.
Education
Report Card
Score drives grade, colour, status chip and progress bar — all from one number.
Widget
Preview and code live in one embed, with controls kept alongside it.
Spring 2025
Sarah Chen
Mathematics
B
72/ 100
Good050100
Notes
The explanation now sits outside the widget, so the preview stays focused on the component while the documentation still explains what the current knobs are doing.
- Score 72 currently resolves to grade B and a good status.
- That same number also sets the progress width to 72% and pushes the accent colour across the badge, status chip, and bar.
Without Block· 6 separate properties
— Status variant: Failed / Poor / Pass / Good / Excellent (5)— Score display: numeric text layer— Progress bar: width + fill colour— Grade letter: text layer— Background tint: 5 colour tokens— Term: text layer
With Block· 5 inputs and one
bind() passtext studentNametext subjectnumber scoretext maxScoreselect term