Components / Print
Print Button
A screen-printed button with an ink outline, a hard offset shadow and a spot ink fill. Lifts on hover and presses flat on click.
Installation
npx shadcn@latest add https://jiaweing.com/r/print-button.jsonWith the @jiaweing namespace set up, use @jiaweing/print-button in place of the URL.
Usage
tsx
import { PrintButton } from "@/components/ui/print-button";tsx
<PrintButton tone="lime">Start</PrintButton>Props
PrintButton
| Prop | Type | Default | Description |
|---|---|---|---|
| tone | "paper" | "pink" | "lime" | "cyan" | "amber" | "foil" | "paper" | The spot ink it is printed in. |
| size | "sm" | "md" | "lg" | "icon" | "md" | Height, padding and type size. |
| className | string | - | Extra classes, merged with cn. |
| ...props | ComponentProps<"button"> | - | Every native button prop. type defaults to button. |
printButtonVariants
| Prop | Type | Default | Description |
|---|---|---|---|
| { tone, size } | VariantProps | - | The same classes as a function, for links and other elements that should look like the button. |
MIT licensed. Copy it, change it, ship it.