Widget State and Actions
Use widget state and widget actions to drive conditions, reveals, media control, and pacing.
Widget logic becomes much more powerful once you understand two ideas:
- State tells you something about what is happening with a widget right now
- Actions make a widget do something
Universal capabilities
Every widget supports a shared set of logic tools.
Common widget states:
- Is visible
- Has been pressed
Common widget actions:
- Show
- Hide
- Toggle visibility
These universal tools are enough to support many practical patterns.
Has been pressed turns on the first time a learner presses the widget — a click, a tap, or Enter or Space from the keyboard — whether or not the widget has any behavior of its own. It stays on for the rest of the lesson, so a later scene can ask whether a button on an earlier scene was pressed. A Submit button counts as pressed once it's used. A widget set to Draggable counts as pressed when it's tapped without being moved. Dragging it doesn't count.
Toggle visibility flips the widget's own visibility. A widget that starts hidden (or is hidden by its visibility condition) is shown by the first toggle and hidden by the next. A widget inside a hidden container stays hidden with it until the container is shown.
Examples:
- A button reveals an image
- A button hides a hint after it has been read
- One widget becomes visible only after another has been pressed
Media widget capabilities
Audio, video, and text-to-speech widgets expose playback state and playback controls.
Common media states:
- Is playing
- Is paused
- Has finished
- Current time
- Duration
Common media actions:
- Play
- Pause
- Seek
Audio and text-to-speech also support:
- Set loop
On a video, Play starts the clip from the beginning, and Has finished stays on once the student has reached the end, even if they replay the clip. See Video Widget.
This makes media widgets useful beyond simple playback.
Example patterns:
- A button starts a video
- A timer completion pauses audio
- One button jumps a clip to a specific point (step by step: Jump to key moments in a video with buttons)
- Text appears only after audio finishes
Timer capabilities
The timer widget exposes:
- Is running
- Is complete
- Elapsed time
- Remaining time
It also supports:
- Start
- Pause
- Reset
Starting a timer that has already finished begins a fresh run from the top.
This is enough to build pacing logic such as:
- Auto-reveal feedback when time runs out
- Unlock a retry button after a countdown
- Pause the timer while a support panel is open
- Save how long a student took: pause a count-up timer, then Set Variable from its Elapsed time (see Time a read-aloud with a stopwatch)
Answer state
Many graded or interactive widgets can tell whether an answer is complete or correct.
- Is correct
- Is answered
These appear on widgets like:
- Text input
- Number input
- Multiple choice
- Checkbox
- Dropdown
- Hotspot
- Fill blank
- Matching
- Sorting list
- Drop bucket
- Text highlight
- Counting collection
- Ten frame (in Build mode)
- Connecting cubes (in every mode but Explore)
- Pattern blocks (in Puzzle and Get and build)
- Quick look (when What students do is Tap a number)
- Dot paper (in Connect the dots and Draw a shape)
- Equal Shares (in Split, Shade, Split and shade and Equal or not?)
- Find in picture
These states are especially helpful when you want a scene to react to correctness without moving immediately to another scene.
A few details worth knowing:
- Grading off doesn't matter here. A widget with grading turned off still reports Is correct and Is answered, so you can branch on a practice question without it counting toward any score.
- Widgets inside a scored container report their own state too, as well as the container's.
- A container is answered once every graded question inside it is answered, and correct when its aggregation rule passes. See Container.
- An empty answer is not an answer. Clicking into a text input, number input, or fill-in-the-blank and leaving it blank keeps Is answered false.
- Set variable can copy either state into a variable ("value from widget property"), the same value a condition would see.
Specialized actions
Some widgets include actions that fit their interaction model.
Example:
- Sorting list supports Reset, which reshuffles the cards so the learner can order them again (the new shuffled order is what a later Submit grades)
- Matching supports Reset, which clears every line the learner drew so they can pair the items again
- Spin wheel supports Reset so a "Spin again" button can clear
spinCountand re-enable spinning
That makes it easy to create a Try Again button that resets the interaction without leaving the scene.
Flashcard state
The flashcard exposes Is flipped — on while the back of the card is showing — and supports Flip and Show front. Use it to reveal a "Next card" button only after the learner has checked the answer, or to turn every card back to the front with one "Start over" button.
Counting collection state
The counting collection exposes Answer, Objects counted, Objects not counted, Repeat taps, Recounted when asked, Answered without counting and, in Watch and judge, Judgment, alongside Is correct and Is answered. It supports Start over, Hide the collection, Reveal the collection and Play the count. Use Repeat taps in a condition on On Answer to send a learner who tapped an object twice to a counting-mat practice scene before moving on.
Quick look state
The quick look exposes Answer, Dots on the card, Looks and Is covered, alongside Is correct and Is answered. It supports Start the look, Show how I saw it and Start over. Call Start the look from a Ready! button so the card never flashes while a child is still listening, and use Looks in a condition on On Answer to send a learner who needed a second look to more practice with the same arrangement.
Dot paper state
Dot paper exposes Sides, Corners, Is closed and Shape name for the shape being drawn, alongside Is correct and Is answered. It supports Start over, Clear and Draw an example shape, which draws a dashed example without counting as the learner's answer. In Free draw, use Sides in a condition on On Shape Closed to celebrate a shape, like "You made a hexagon!" when Sides is 6.
Equal Shares state
Equal Shares exposes Parts, Parts are equal, Shaded parts and Shaded amount (a number: 0.5 for a half, 0.25 for a fourth), alongside Is correct and Is answered. It supports Start over, Clear, Show the next cut (draws the next line of the example cut, or of a Show card's cut when it reveals one line at a time) and Shade the example parts, which shades a dashed example without counting as the learner's answer. Use Shaded amount in a condition on On Shade to react the moment a learner shades a half, like "That's a half!" when Shaded amount is 0.5.
Number tracing state
Number tracing exposes Strokes done, Strokes that faded, Written reversed and Used Tap the dots, alongside Is correct and Is answered (every step finished). It supports Start over, Clear the writing and Watch me. Use Strokes that faded in a condition on On Traced to offer a learner who strayed a lot another tracing scene with Watch me played first.
Ten frame state
The ten frame exposes Count, Red count, Yellow count, Empty squares and Is full, alongside Is correct and Is answered. It supports Reset and Clear (both empty the frame) and Fill, which places a number of counters in order — handy on a "Show me" button that demonstrates before learners try. Use Count in a condition on On Counters Change to react as learners work, like "Now flip 2 of them!" once the count reaches 5.
Fingers state
The fingers widget exposes Fingers up, Left hand count, Right hand count and Done taps, alongside Is correct and Is answered. It supports Set count, which raises a number of fingers in counting order, Count up, which raises them one at a time with the count spoken, and Reset. Use Fingers up in a condition on On Done to give a hint, like "Count them again" when a learner shows 4 instead of 3.
Connecting cubes state
The connecting cubes widget exposes Cubes on the board, a count for each color (Red cubes, Blue cubes, and so on), Tallest tower, Longest train and Done taps, alongside Is correct and Is answered. It supports Reset, Clear and Build the card, which builds the card's object (or the Tower target) at the bottom left of the board — handy on a "Show me" button. Use Red cubes in a condition on On Cubes Change to say "Now count your red cubes!" once a child has placed 3.
Pattern blocks state
Pattern blocks expose Blocks (how many are out), a count for each block (Hexagons, Trapezoids, Blue rhombuses, Triangles, Squares, Tan rhombuses), Outlines filled and Done taps, alongside Is correct and Is answered. They support Reset, Clear and Solve the puzzle, which fills every outline as a demonstration without counting as the learner's answer. Use a count in a condition on On Blocks Change to react as learners build, like "You made a hexagon out of triangles!" once Triangles reaches 6.
Number sentence state
The number sentence exposes Box 1, Box 2 … (each box's number, or −1 while the box is empty), Boxes filled and Is true, alongside Is correct and Is answered. It supports Reset and Clear (both empty every box) and Fill a box, which puts a number in a box for a worked example. Use Box 1 in a condition on On Check to give a specific hint, like "Is 3 how many there were at the start?" when box 1 holds 3.
Find in picture state
The find in picture widget exposes Found, To find, Wrong taps and All found, alongside Is correct and Is answered. It supports Reset, which clears every mark, and Reveal the answers, which marks every region to find — handy on a "Show me" button that demonstrates before learners try. Use Wrong taps in a condition on On All Found to praise a clean search ("You found them all without a slip!"), or follow the question with a number input that checks "How many did you find?" against Found.
Spin wheel state
The spin wheel exposes:
- Has been spun — true once the learner has completed at least one spin
- Spin count — how many spins have completed
- Last selected segment id — id of the most recently landed segment
- Last selected segment label — label of the most recently landed segment
These are useful for conditional reveals like "show the next prompt only after the wheel has been spun," or branching like "if the landed segment label was 'Bonus' then increment a streak variable." When a condition checks the last selected segment (label or id), pick the segment from a list of the wheel's segments — no need to know its id — or Not spun yet to test for a wheel nobody has spun.
Renaming an option a condition points at
A few of these states hold a piece of text you can edit later: a dropdown's selected value is the option's label, and the spin wheel's last selected segment is a segment's label or id.
If you rename or delete that option, any condition checking for the old text stops matching — it can never be true again, so students quietly take the other branch.
Berdee catches this for you:
- The condition shows the old text marked "— no longer an option", so you can see exactly what broke. Pick a current option to fix it.
- Publishing is blocked until you do, so a lesson can't reach students with a branch that never fires.
- If the condition checks that the answer is not the missing option, you'll get a warning instead of a block — that condition is now always true, so it isn't filtering anything, but nothing is broken.
Berdee never guesses a replacement for you. Only you know which option you meant.
Checking that a dropdown is still unanswered is a normal thing to want, so Nothing selected yet is offered as a choice alongside the real options — and Not spun yet for a spin wheel.
Drag and drop behavior
Text, image, button, and shape widgets can also participate in drag-and-drop logic. Media players — audio and video — cannot; see Draggable Widget.
In practice, that means you can configure things like:
- Whether a widget is draggable
- Whether it should return to its original position
- Which targets are valid drop zones
- What should happen when something is dropped successfully
This is useful for:
- Categorization
- Matching-like movement tasks
- Physical sorting routines
- Game-style collection mechanics
Example pattern:
- Make an image card draggable
- Allow only one drop bucket as a valid target
- When dropped correctly, update score or reveal feedback
Best way to use state and actions
State is usually best for:
- Conditions
- Visibility rules
- Branching checks
Actions are usually best for:
- Button-triggered actions
- Media control
- Resets
- Staged reveals
Compelling real-world examples
- A Listen button triggers text-to-speech playback, then a prompt appears once playback finishes.
- A Reveal Diagram button shows an image and hides itself after being pressed.
- A Start Challenge button starts a timer and reveals a sorting activity at the same moment.
- A Reset button reshuffles a sorting list so the learner can try again without leaving the scene.
- A drag-and-drop category task updates a variable when the learner places an item in the correct bucket.