Skip to content
On this page

Button

A generic component used to start an instant operation

Kind

Kind
Primary, Secondary, Tertiary
<template>
  <div style="display: flex; gap: 5px">
    <v-button type="primary">Primary</v-button>
    <v-button type="secondary">secondary</v-button>
    <v-button type="tertiary">tertiary</v-button>
  </div>
</template>

Size

Size
Mini, Compact, Default, Large
<template>
  <div style="display: flex; gap: 5px">
    <v-button size="mini">Mini</v-button>
    <v-button size="compact">Compact</v-button>
    <v-button size="default">Default</v-button>
    <v-button size="large">Large</v-button>
  </div>
</template>

Shape

Shape
Default, Pill, Round, Circle, Square
<template>
  <div style="display: flex; gap: 5px">
    <v-button shape="default">Default</v-button>
    <v-button shape="pill">Pill</v-button>
    <v-button shape="round">Round</v-button>
    <v-button shape="circle">Circle</v-button>
    <v-button shape="square">Square</v-button>
  </div>
</template>

Disabled

Disabled
Disabled on buttons
<template>
  <v-button disabled>Disabled</v-button>
</template>

Loading

Loading
Loading on buttons
<template>
  <v-button loading>loading</v-button>
</template>

Events

onClick

onClick
Click event
<template>
  <v-button @click="greeting">Click me</v-button>
</template>

<script setup>
const greeting = () => alert('Hello');
</script>