Button

Push buttons in every macOS 27 style: the accent-filled default button, bordered, tinted, borderless and destructive, from mini to extra large.

@cupertinoui/buttonRegistry JSON

Installation

pnpm dlx shadcn@latest add @cupertinoui/button

The first install also adds the macOS theme. See Installation to set up the registry.

Usage

import { Button } from "@/components/ui/button"

<Button variant="secondary">Cancel</Button>
<Button>Save</Button>

Examples

Variants

Default is the accent-filled default button of a window. Bordered is the standard push button; tinted, borderless and destructive cover the rest of the macOS 27 styles.

Sizes

Mini, small and medium buttons are rounded rectangles. Large and extra large buttons are capsules, as in macOS 27.

With an icon

Disabled

API Reference

Every part forwards the props of the underlying element. The props below are the ones CupertinoUI adds or changes.

Button

Base UI's Button: a native button, or another element with render.

PropTypeDescription
variant"default" | "secondary" | "tinted" | "outline" | "ghost" | "destructive" | "link"
Default: "default"
The button style.
size"xs" | "sm" | "default" | "lg" | "xl" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | "icon-xl"
Default: "default"
Mini (16pt), small (20pt), medium (24pt), large (28pt) or extra large (36pt).
renderReactElementRender another element with the button's styles, e.g. render={<Link href="/docs" />}. Add nativeButton={false} when it isn't a <button>.
classNamestringExtra classes, merged with the component's own.