Badge
Compact status badge for product cards, listings, and detail pages. Use it for labels like New, Sale, Featured, and stock state.
Best for
Import
import { Badge } from "@enadhq/enad-react-sdk/client/storefront"When to use it
Use Badge anywhere a product or listing needs a short status label: new arrivals, sale prices, stock state, featured picks, and limited editions. It is the standard pill element across product cards, detail pages, and listing grids.
Composition notes
Badge is a simple wrapper around children with a variant-driven color scheme:
variantcontrols the color:default,sale(error color),new,out-of-stock,featured,limited,premium(accent color), andinfo.childrenis the label text or content inside the pill.
No slots, no compound parts. Just pick a variant and pass the label.
Behavior and theming guidance
Badge colors respond to CSS variables (--enad-text-primary-color, --enad-error-color, --enad-accent-color), so they adapt to the active theme automatically. Keep labels short (one or two words) since badges are designed for compact inline display.
Examples
Live examples you can edit directly in the sandbox.
Status badges
Use badge variants to call out availability, merchandising, or campaign state in a compact row.
Component Sets
Preview the first example across the available component-set presets to compare tone, spacing, and structural defaults.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| variant | string | default | Visual style variant of the badge |
| children | string | — | Text or element displayed inside the badge |
| className | string | No description yet. |