Components

Label tag

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.

Install

terminal
npx shadcn@latest add @wobko/label-tag

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

Examples

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.

Shapes, stocks, string

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.

Tags that link

`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 shelf of price tags

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.

API reference

LabelTag

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.

PropTypeDefaultDescription
asChildbooleanfalseRender your link or button as the tag. It swings 2.6 degrees about its eyelet on hover.
stockStockName"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).
stringnumber36How 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 / sizeboolean | 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.

Accessibility

  • A tag is a `div`: put text in it. As a link or button (`asChild`) it keeps its native role, focus and keyboard behavior; the drawing is aria-hidden decoration and the swing is a hover-only, reduced-motion-aware nicety (none in calm density).
  • Information carried by the twine color or the eyelet must also be in text. Ink on kraft, paper and the sticky stocks is at least 9:1; the price is a red darkened with ink and reads at least 4.9:1 on all of them.
  • The tilt is zero in calm density; Windows high contrast replaces the drawing with a real outline around the box (the string is not shown).

Source

The files the CLI copies into your project.

Loading the source