Adds the ability for a button to be clicked and then not allow any further clicks until the duration has elapsed. Will also update the button's label while in progress.
<button type="submit" class="button button-longrunning" data-controller="w-progress" data-w-progress-active-class="button-longrunning-active" data-w-progress-active-value="{% trans 'Signing in…' %}" data-w-progress-duration-seconds-value="40" data-action="w-progress#activate"> {% icon name="spinner" %} <em data-w-progress-target="label">{% trans 'Sign in' %}</em></button> Copy
<button type="submit" class="button button-longrunning" data-controller="w-progress" data-w-progress-active-class="button-longrunning-active" data-w-progress-active-value="{% trans 'Signing in…' %}" data-w-progress-duration-seconds-value="40" data-action="w-progress#activate"> {% icon name="spinner" %} <em data-w-progress-target="label">{% trans 'Sign in' %}</em></button>
Label to use when loading
Readonly
Label to store the original text on the button
Optional
Static
Adds the ability for a button to be clicked and then not allow any further clicks until the duration has elapsed. Will also update the button's label while in progress.
Example