A shadcn-style button component built with Ark UI primitives.

Installation

npx shadcn@latest add @ark-cn/button

Usage

import * as Button from "@/components/ui/button"

Read exported parts in src/components/ui/button.tsx and compose the primitive according to the Ark UI pattern for this component.

Examples

Default

Outline

Secondary

Destructive

Destructive Outline

Ghost

Extra-small Size

Small Size

Large Size

Extra-large Size

Disabled

Icon

Icon Small Size

Icon Large Size

With Icon

Loading (Built-in Prop)

Loading (Custom Composition)

API reference

This component is an ark-cn composition. All props and DOM behavior are defined by Ark unless you see an ark-cn-only row below.

Button

PropTypeDescription
variant?"default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | "info" | "success" | "warning" | "destructive-outline"Visual style preset.
size?"default" | "sm" | "lg" | "xl" | "xs" | "icon" | "icon-xs" | "icon-sm" | "icon-lg"Size preset including icon-only sizes.
loading?booleanShows spinner, sets aria-disabled and data-loading.