Component
Loading Button Spinner
Loading buttons with spinner animations
- Component
- Tailwind
- MIT
Preview
Live component
9:41 100%
devsnips.site/library/tailwind/components/buttons/loading-button/spinner/ fluid · no fixed width 100%
Install
Add to your project
npx devsnips add Tailwind/Components/Buttons/loading-button/spinner Tailwind/Components/Buttons/loading-button/spinner <!-- Loading Button Spinner Animation -->
<style>
@keyframes spin {
to { transform: rotate(360deg); }
}
.animate-spin {
animation: spin 1s linear infinite;
}
</style>
<!-- Loading Button - Primary -->
<button class="px-6 py-2.5 bg-blue-600 text-white font-medium rounded-lg flex items-center gap-2 cursor-wait" disabled>
<svg class="w-5 h-5 animate-spin" fill="none" viewBox="0 0 24 24">
<circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle>
<path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path>
</svg>
Loading
</button>
<!-- Loading Button - Success -->
<button class="px-6 py-2.5 bg-green-600 text-white font-medium rounded-lg flex items-center gap-2 cursor-wait" disabled>
<svg class="w-5 h-5 animate-spin" fill="none" viewBox="0 0 24 24">
<circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle>
<path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path>
</svg>
Processing
</button>
<!-- Loading Button - Outline -->
<button class="px-6 py-2.5 border border-gray-300 text-gray-700 font-medium rounded-lg flex items-center gap-2 cursor-wait bg-gray-50" disabled>
<svg class="w-5 h-5 animate-spin text-gray-500" fill="none" viewBox="0 0 24 24">
<circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle>
<path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path>
</svg>
Refreshing
</button> # Loading Button Spinner
Button with spinner loading indicator.
## Preview
Open `preview.html` for a standalone demonstration.
## Features
- Spinner loading state
- Focus-visible states
## Usage
```bash
npx devsnips add Tailwind/Components/Buttons/loading-button/spinner
```
Copy from `code.html`.
## Customization
- Spinner size/color, button surface
## Accessibility
- Prefer `aria-busy="true"` while loading
## Dependencies
- Tailwind CSS only
## File Structure
- `code.html` · `preview.html` · `metadata.json` · `README.md` 36 lines UTF-8 · LF · Spaces: 2
DevSnips AI ready Claude · Cursor · Windsurf
Agent skill & Model Context Protocol
Pass this component straight into your AI workflow. DevSnips exposes each resource as a structured, addressable registry entry, so your agent installs the real files instead of approximating them.
devsnips://components/buttons/loading-button/spinner I want to use this DevSnips resource in production: Page: https://devsnips.site/library/tailwind/components/buttons/loading-button/spinner/ Install: npx devsnips add Tailwind/Components/Buttons/loading-button/spinner This is the Loading Button Spinner — Loading buttons with spinner animations Use this DevSnips resource as the starting point for my project. Adapt it to my project's stack and conventions, fix any issues, and make it production-ready while preserving its intended design and behavior.
Paste into ChatGPT, Claude or your agent — it already carries the page URL and the exact install path.
Resource URI
devsnips://components/buttons/loading-button/spinner