Theme Playground

Commerce

Badge

Compact status badge for product cards, listings, and detail pages. Use it for labels like New, Sale, Featured, and stock state.

Best for

product labelsstatus pillssale and stock badges

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:

  • variant controls the color: default, sale (error color), new, out-of-stock, featured, limited, premium (accent color), and info.
  • children is 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.

1 example

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

PropTypeDefaultDescription
variantstringdefault
Visual style variant of the badge
childrenstring
Text or element displayed inside the badge
classNamestring
No description yet.