组件

Sticker

Die-cut vinyl stickers: the art with a white border, a cut line, a soft shadow and, if you like, a peeled corner. Status badges (done, sale) are generated; the rest are drawn by hand.

安装

terminal
npx shadcn@latest add @wobko/sticker

第一次使用?先把 registry 加进 components.json。 如何安装

示例

Default

Die-cut vinyl: a white border, a cut line, a soft shadow and a small seeded tilt. Badges like Done and Sale are generated; the rest are drawn.

Peeled corner

`peel` folds the lower-right corner over along a line perpendicular to the diagonal, whatever the silhouette. A number is the fold in px.

Slapped on a card

A sticker on an index card. Size it small and it switches to its 64 px redraw.

Every sticker drawn so far

One shelf per batch, and it grows by itself as new batches land. Only the open shelf is on the page, so a gallery of nearly ninety stickers stays light.

API 参考

Sticker

An intrinsic ink svg. The border is a fat round-join stroke of the silhouette, defined once and reused; the shadow is a CSS filter.

属性类型默认值说明
nameStickerName | string-A sticker id (`done`, `sale`, `cursor-click`, `hand-point-right`...). Stamp ids render as flat stamps.
sizenumber96Pixels of the art; the border is added around it. Below 80 the 64 px redraw, from 128 the extras.
peelboolean | numberfalseFold the lower-right corner over. `true` picks a size from the sticker; a number is the fold in px. Works for any silhouette.
rotatenumber | "auto""auto"Degrees, or a small seeded tilt that `density="calm"` flattens.
bordernumber-White border width in px (default 7.5% of the size, 3.5 to 8).
shadowbooleantrueThe soft drop shadow (`ll-drop-sticker`, a CSS filter).
seedstring | number-Another seed, another hand (and another auto tilt).
labelstring-Accessible name. Decorative (`aria-hidden`) without it.

无障碍

  • Decorative by default. A badge that carries meaning (Done, Sale) should sit next to real text or be given a `label`.

源码

CLI 会复制进你项目的文件。

正在加载源码