Component
Loading Button Progress
Loading buttons with progress bar indicator
- Component
- Tailwind
- MIT
Preview
Live component
9:41 100%
devsnips.dev/library/tailwind/components/buttons/loading-button/progress/ fluid · no fixed width 100%
Install
Add to your project
npx devsnips add Tailwind/Components/Buttons/loading-button/progress Tailwind/Components/Buttons/loading-button/progress <!-- Loading Button with Progress Bar -->
<!-- Blue Progress -->
<button class="relative w-full overflow-hidden rounded-lg bg-blue-600 px-6 py-3 text-base font-medium text-white cursor-wait" disabled>
<span class="mr-2">Uploading...</span>
<div class="absolute bottom-0 left-0 h-1 bg-blue-300 w-1/3 animate-pulse"></div>
</button>
<!-- Green Progress -->
<button class="relative w-full overflow-hidden rounded-lg bg-green-600 px-6 py-3 text-base font-medium text-white cursor-wait" disabled>
<span class="mr-2">Processing...</span>
<div class="absolute bottom-0 left-0 h-1 bg-green-300 w-2/3 animate-pulse"></div>
</button>
<!-- Purple Progress -->
<button class="relative w-full overflow-hidden rounded-lg bg-purple-600 px-6 py-3 text-base font-medium text-white cursor-wait" disabled>
<span class="mr-2">Installing...</span>
<div class="absolute bottom-0 left-0 h-1 bg-purple-300 w-1/2 animate-pulse"></div>
</button> # Loading Button Progress
Button with progress-style loading treatment.
## Preview
Open `preview.html` for a standalone demonstration.
## Features
- Progress / loading presentation
- Focus-visible states
## Usage
```bash
npx devsnips add Tailwind/Components/Buttons/loading-button/progress
```
Copy from `code.html`. Drive the loading state from your application logic.
## Customization
- Progress indicator classes, colors
## Accessibility
- Prefer `aria-busy="true"` while loading
## Dependencies
- Tailwind CSS only
## File Structure
- `code.html` · `preview.html` · `metadata.json` · `README.md` 18 lines UTF-8 · LF · Spaces: 2
Continue browsing