Docs menu

Button

A mochi-squishy button. It squashes when pressed and wobbles back like jelly. In kawaii mode the release is a full beat: a soft glow, manga emphasis lines, clouds rolling off both ends, sparkles and an onomatopoeia that slams in.

Installation

❯ npx shadcn@latest add https://yan.moe/r/button.json

Usage

tsx
import { Button } from "@/components/ui/button"
tsx
<Button>おはよう!</Button>

Examples

Variants

Intensity

kawaii is the default. Use subtle where you want a lighter touch, or off for a plain button. Set your own sticker with sfx, or hide it with sfx={false}.

Sizes & custom effects

Pass fx to change the burst: shapes, colors, count and power.

As a link

Use asChild to give another element (such as Next.js Link) the button's look and behavior.

tsx
<Button asChild>
  <Link href="/docs">Get started</Link>
</Button>

Accessibility

  • It renders a native <button>, so focus, Enter and Space work as usual. Keyboard clicks burst from the button's center.
  • The effects canvas is aria-hidden and ignores the pointer.
  • With prefers-reduced-motion: reduce, squish and particles are skipped.

API

PropTypeDefault
variant

Color and surface style.

"default" | "secondary" | "mint" | "destructive" | "outline" | "ghost" | "link""default"
size

Height and padding.

"sm" | "default" | "lg" | "icon""default"
intensity

kawaii: squish, soft glow, emphasis lines, clouds and a slammed-in sticker. subtle: a small bounce and sparkles. off: plain.

"kawaii" | "subtle" | "off""kawaii"
sfx

Onomatopoeia shown in kawaii mode. false hides it.

string | falserandom
fx

Overrides for the click burst (shapes, colors, count, power, size…).

BurstOptions-
asChild

Merge props onto the child element instead of rendering a <button>.

booleanfalse