EWC Badge

A compact inline chip for a European Waste Catalogue code — the formatted code, a hazard asterisk and dot for hazardous entries, and an optional short label.

$bunx shadcn@latest add @nx-ui/ewc-badge
Registry item
Installs withutils

Codes

Any accepted spelling normalises to the spaced form; hazardous codes carry the asterisk and red dot.

17 01 0117 05 0417 06 05*20 03 07

Labels

A short label after the code, for lists where the material name saves a lookup.

17 01 01Concrete17 05 04Soil and stones17 06 05*Asbestos-containing materials

Entry objects

Pass an EwcEntry-compatible object — its hazard flag wins over the asterisk on the code.

17 06 05*Construction materials containing asbestos19 12 09Minerals

Interactive

With an onClick the chip renders as a button — handy for opening the code detail in the EWC lookup.

API reference

Exported parts and their props, extracted from the component source.

PropTypeDefaultDescription
codestringThe EWC code — "170101", "17 01 01" or "17 01 01*" (asterisk = hazardous).
entryEwcBadgeEntryAn `EwcEntry`-compatible object; its hazard flag wins over the asterisk.
labelstringOptional short label shown after the code, e.g. a material name.
onClick() => voidRenders the chip as a button.
classNamestring

…extends VariantProps<typeof ewcBadgeVariants>