How to Create a Countdown Verification Code Button with Dynamic Panels in Axure
This step‑by‑step guide shows how to build a login page featuring a "Send Verification Code" button that counts down using a dynamic panel, event loop, and global variables, covering panel setup, state cycling, conditional logic, and styling for disabled states.
Create the login page and name the button "Send Verification Code".
Drag a dynamic panel onto the canvas, place it outside the phone frame, and add two empty states without any content.
Set the dynamic panel to loop between the two empty states continuously.
Add a "On State Change" event to the panel that updates the button text with the remaining seconds. Define a global variable for the countdown (default 60 s, demo uses 75 s).
Add a condition so that when the countdown reaches 0 the timer stops.
When the global variable equals 0, reset the button text to the original "Send Verification Code" using an else‑if branch.
After the countdown finishes, re‑initialize the global variable so the button can be used again.
Disable the button while the countdown is active and give it a gray fill color.
When the countdown ends, re‑enable the button.
Final demo effect.
The key feature of this example is the combination of event loop + global variable . By using two empty states in a dynamic panel that continuously loop, each state change triggers actions that emulate a timer, while the panel itself holds no visual content; at least two states are required for the loop.
AI Software Product Manager
Daily updates of Xiaomi's latest AI internal materials
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
