Skip to main content

Badge

Live preview of the Badge element in the Salient WordPress theme. A New badge above a heading, and beneath it every badge style the element offers. Sample content, for demonstration only.
NewSpring collectionForty pieces, cut for the season.
Accent colorCustom colorSee throughRadius 6SquareMinimal line

The Badge is a short piece of text in a pill or box, used to label what follows: New, Most popular, a category name, a step number. In the demos it usually sits directly above a heading as an eyebrow line.

Settings​

  • Badge Text Text The label. One or two words.
  • Badge Style Choice Default draws the pill or box. Minimal Line drops the container entirely and sets a short rule before the text, for an eyebrow that needs no weight.
  • Inherit Typography From Choice Which heading level's typography it borrows, so it stays in step with the site's type scale rather than carrying its own font size.
  • Background Color Color A theme color, a custom one, or See Through for an outline with nothing behind it.
  • Padding Amount Choice Space between the text and the badge edge.
  • Border, Border Width and Border Color An outline, on its own or around a fill. Default style only.
  • Border Radius Choice From square through to a full pill. Default style only.
  • Line Width Number How far the rule runs before the text. Minimal Line style only.
  • Display Choice Block puts the badge on its own line, Inline lets it sit within a line of text.
  • Margin NumberResponsive. Set a different value for desktop, tablet and phone. Space on each of the four sides.
Badge or heading

A badge is decoration, not structure. If the text names a section that belongs in the page outline, make it a real heading; a screen reader will not announce a badge as one.