Skip to content

Button

A basic button component with multiple styles and sizes.

Basic Usage

vue
<template>
  <MButton>Default</MButton>
  <MButton type="primary">Primary</MButton>
  <MButton type="danger">Danger</MButton>
  <MButton type="text">Text</MButton>
</template>

Sizes

vue
<template>
  <MButton size="small">Small</MButton>
  <MButton size="medium">Medium</MButton>
  <MButton size="large">Large</MButton>
</template>

Disabled State

vue
<template>
  <MButton disabled>Disabled</MButton>
  <MButton type="primary" disabled>Disabled Primary</MButton>
</template>

Props

NameTypeDefaultDescription
type'primary' | 'default' | 'danger' | 'text''default'Button type
size'small' | 'medium' | 'large''medium'Button size
disabledbooleanfalseWhether the button is disabled

Events

NameParametersDescription
click(event: MouseEvent)Triggered when the button is clicked

Slots

NameDescription
defaultButton content

Released under the MIT License.