A hang tag
A card with clipped corners, a hole with its patch and brass eyelet, and a loop of natural twine. Everything drawn is one sheet: it turns and casts one shadow.
A hang tag: cut card with clipped corners (or an arched top, or a luggage tag's clipped end), a hole with a reinforcing patch and a brass eyelet, and a loop of twine. The whole silhouette is one drawn sheet, so the string and the eyelet turn and cast their shadow with the card. As a link or a button it swings on its eyelet.
npx shadcn@latest add @wobko/label-tagFirst time here? Add the registry to components.json first. How to install
A card with clipped corners, a hole with its patch and brass eyelet, and a loop of natural twine. Everything drawn is one sheet: it turns and casts one shadow.
Price tag, arched, and a luggage tag; kraft, white and colored card; natural or colored twine; a brass eyelet, a steel one, or a bare hole.
`asChild` makes the tag a link (or a button). It keeps its native focus and keyboard behavior and swings on its eyelet when you hover it.
A real use: a product shelf on a kraft card, two tags to a row. Each tag is a labeled group with its price as text; the string hangs from the shelf edge.
A `div` (or your own element with `asChild`) whose content sits on the card below the eyelet. Until it is measured (or given `size`) it wears a plain card; the drawing then replaces it.
| Prop | Type | Default | Description |
|---|---|---|---|
| asChild | boolean | false | Render your link or button as the tag. It swings 2.6 degrees about its eyelet on hover. |
| stock | StockName | "kraft" | What it is cut from: kraft, paper, index-card, sticky-yellow, sticky-pink ... |
| shape | "price" | "round" | "luggage" | "price" | Clipped top corners; an arched top; or a horizontal luggage tag hung from the start (mirrors in RTL). |
| string | number | 36 | How far the loop of twine hangs out, px. The tag gets that much margin on its hanging side (`mt-(--tag-string)`); override it with a margin class. |
| twine | "natural" | Accent | "natural" | The color of the string. |
| eyelet | "brass" | "steel" | "none" | "brass" | The metal ring in the hole, or a bare hole. |
| tilt / seed / size | boolean | number / string | number / [w, h] | - | A seeded turn under 2 degrees (or degrees, or false); pins the hand; the box in px for server-rendered drawings. |
The files the CLI copies into your project.
Loading the source