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.

AI Software Product Manager
AI Software Product Manager
AI Software Product Manager
How to Create a Countdown Verification Code Button with Dynamic Panels in Axure

Create the login page and name the button "Send Verification Code".

Screenshot
Screenshot

Drag a dynamic panel onto the canvas, place it outside the phone frame, and add two empty states without any content.

Screenshot
Screenshot

Set the dynamic panel to loop between the two empty states continuously.

Screenshot
Screenshot

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).

Screenshot
Screenshot
Screenshot
Screenshot

Add a condition so that when the countdown reaches 0 the timer stops.

Screenshot
Screenshot

When the global variable equals 0, reset the button text to the original "Send Verification Code" using an else‑if branch.

Screenshot
Screenshot

After the countdown finishes, re‑initialize the global variable so the button can be used again.

Screenshot
Screenshot

Disable the button while the countdown is active and give it a gray fill color.

Screenshot
Screenshot
Screenshot
Screenshot

When the countdown ends, re‑enable the button.

Screenshot
Screenshot

Final demo effect.

Demo GIF
Demo GIF
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.
Event Loopverification codeGlobal VariableUI prototypingAxuredynamic panel
AI Software Product Manager
Written by

AI Software Product Manager

Daily updates of Xiaomi's latest AI internal materials

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.