Preview
Props
Variants
Rounded pill
Hot pink
Tiny chip
Chunky dither
Fine dither
Install
npx shadcn@latest add @evilbuttons/dither-buttonUsage
import DitherButton from "@/components/evil-buttons/dither-button";
export function ButtonDemo() {
return <DitherButton>Launch</DitherButton>;
}Props
The component spreads any <button> HTML attributes.
| Prop | Type | Default | Description |
|---|---|---|---|
children | React.ReactNode | - | The visible button label or content. |
className | string | - | Extra classes passed to the button. |
ditherColor | string (hex) | - | Override the dither "on" pixel color (e.g. #ff0066). Falls back to the resolved color. |
ditherOpacity | number (0–1) | 1 | CSS opacity applied to the dither canvas. |
ditherSize | number (1–32) | 4 | Pixel scale of the dither particles. Higher = chunkier blocks. |
Good to know
- Dither colors follow the canvas's CSS
colorandbackground-color, so it themes itself. - Draws one still frame under
prefers-reduced-motion.