Button

A macOS push button (NSButton). Supports default, prominent, and destructive variants in the five standard control sizes.

Usage

vue
<script setup lang="ts">
import { MacButton } from 'macvue'
</script>

<template>
  <MacButton>Click me</MacButton>
</template>

Variants

Sizes

All five macOS control sizes; regular is the default.

Disabled

API

Props

PropTypeDefault
size'extra-large' | 'large' | 'regular' | 'small' | 'mini''regular'
variant'default' | 'prominent' | 'destructive''default'
disabledbooleanfalse

Slots

SlotDescription
defaultButton label content.

Exposed

NameTypeDescription
elRef<HTMLButtonElement | null>The underlying button element.
focus() => voidFocuses the button.
blur() => voidRemoves focus from the button.