Components

Napkin

A paper napkin to write on: tissue with a pinked edge and a pressed border, folded so it has creases (a valley with a shade on one side and a pale line on the other), optionally ringed by a coffee cup. Notes on it are set in the script font, as if in marker.

Install

terminal
npx shadcn@latest add @wobko/napkin

First time here? Add the registry to components.json first. How to install

Examples

A napkin

Folded in four, so it has a crease each way. The edge is pinked and the border pressed into the tissue.

Quarter, half, flat

Folded in four, in half with a coffee ring, and unfolded.

Ideas on a napkin

Doodles and stickers go on a napkin as on any paper; here a star and a sticker beside the note.

A note for the table

A real use: a guest writes a note on the napkin and pins it to the board. The napkin holds a form; its script font is only for what is written.

API reference

Napkin

A Paper on the `napkin` stock (crimped edge, embossed border, both drawn once it is measured) with the creases as a second layer of ink. 18 rem wide, at least 14 rem tall, padded 36 px so text sits inside the pressed border.

PropTypeDefaultDescription
fold"quarter" | "half" | "none""quarter"A crease each way through the middle; one across; or unfolded.
stainbooleanfalseA coffee ring (multiply-printed, faint).
tape / fastener / tilt / seed / size / asPaper props-As on any sheet. A napkin turns up to 1.2 degrees.

Accessibility

  • A napkin is a plain `div`; use `as="article"` with a label when it means more. The creases, the stain and the pressed border are aria-hidden decoration.
  • Ink on the napkin is 14:1; the footer 9:1. The creases only shade the paper by a few percent, so they never cost contrast. The tilt is zero in calm density.

Source

The files the CLI copies into your project.

Loading the source