Did you know?dyk.si

Loading Button

A button that shows a spinner after you press it, so it can’t be pressed twice.

<button aria-busy="true" disabled>

When to use it

For any action that takes seconds: payment, submit.

Common mistake

Don’t let the button change width while loading.

Accessibility

Keep the label for screen readers (Saving…) and keep the button width fixed.

Name in code

HTML/CSS<button aria-busy="true" disabled>
React<Button loading>
Jetpack ComposeButton(enabled=false) { CircularProgressIndicator }
SwiftUIButton { ProgressView() }

Ready prompt for your coding agent

Add a Loading Button to this screen. What it is: A button that shows a spinner after you press it, so it can’t be pressed twice. Implement with: <button aria-busy="true" disabled> (HTML/CSS). Accessibility: Keep the label for screen readers (Saving…) and keep the button width fixed. When to use it: For any action that takes seconds: payment, submit. Avoid: Don’t let the button change width while loading. Reuse the project's existing design tokens, spacing and component conventions.

Or compose a whole page from this element and others →

Prompts are in English for the most precise results with coding agents.