Component Locations
Usage
Import both Button and Spinner, then conditionally render the Spinner inside the button:Pattern
The loading button pattern consists of three parts:- Disable the button - Add
:disabled="isLoading"to prevent double clicks - Show the spinner - Add
<Spinner v-if="isLoading" class="mr-2" />before the text - Keep the text visible - The button text remains visible during loading
Spinner Customization
The Spinner component accepts aclass prop for styling:
Examples
Form Submit Button
Delete Button
With Validation
Related Documentation
- UI Design System - Overall design patterns
- Global Sonner Toast System - Toast notifications

