MtButton component is a versatile button that supports multiple variants, sizes, icons, and loading states.
Import
Props
The visual style variant of the button.
The size of the button.
Toggles the disabled state of the button.
Applies a ghost style with transparent background and border.
Makes the button square-shaped, useful for icon-only buttons.
Makes the button full-width and centered.
Shows a loading spinner and hides button content.
The HTML element or Vue component to render as.
Deprecated: Use
is="a" and href instead. URL to navigate to when clicked.Slots
The button label content.
Icon displayed before the button text. Receives
size prop.Icon displayed after the button text. Receives
size prop.Usage
Basic Button
Button with Icons
Loading State
Button Sizes
Button Variants
Accessibility
- Uses native
<button>element by default for proper keyboard navigation - Disabled buttons have
tabindex="-1"when inside tooltips - Loading state is communicated through visual spinner
- Focus visible with outline for keyboard navigation