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.jsonUsage
import { Button } from "@/components/ui/button"<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.
<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-hiddenand ignores the pointer. - With
prefers-reduced-motion: reduce, squish and particles are skipped.
API
| Prop | Type | Default |
|---|---|---|
variantColor and surface style. | "default" | "secondary" | "mint" | "destructive" | "outline" | "ghost" | "link" | "default" |
sizeHeight and padding. | "sm" | "default" | "lg" | "icon" | "default" |
intensitykawaii: squish, soft glow, emphasis lines, clouds and a slammed-in sticker. subtle: a small bounce and sparkles. off: plain. | "kawaii" | "subtle" | "off" | "kawaii" |
sfxOnomatopoeia shown in kawaii mode. false hides it. | string | false | random |
fxOverrides for the click burst (shapes, colors, count, power, size…). | BurstOptions | - |
asChildMerge props onto the child element instead of rendering a <button>. | boolean | false |