Skip to content

Button ​

State belongs to the parent. Compose this component with the props and slots below.

Preview ​

Open in the playground

Usage ​

ButtonExample.vueVue / TS
<script setup lang="ts">
import { FzButton } from '@chrisdalbano/forza-ui'
function saveBuild(): void {
  /* your application action */
}
</script>

<template>
  <FzButton @click="saveBuild">Save build</FzButton>
</template>
TypeScript exampleSource you can use.

Import the shared stylesheet once and wrap your app in .fz-theme. See installation.

Props ​

NameTypeRequiredDefault
variant"primary" | "secondary" | "ghost" | undefinedNo"primary"
size"md" | "sm" | undefinedNo"md"
disabledboolean | undefinedNoNone
loadingboolean | undefinedNoNone
type"button" | "submit" | "reset" | undefinedNo"button"

Events and state ​

native click

Slots ​

default, trailing

Add from source ​

sh
forza add button

Set up the CLI first. Generated API tables come from the Vue source, using Vue Language Tools.

Released under the MIT License. Independent work.