Skip to content

Link Badge — Reference

Reference · Advanced · Bootstrap 5

Link Badge settings and behavior. Settings include ID, Class, Badge, Position.

Clickable badge rendered as a link. Set Href (or Internal) and choose a badge variant; useful for tag/category links.

Name Description
IDOptional unique identifier for this element. Sets the element's id attribute. Keep IDs unique per page (useful for anchors, label for targets, and JavaScript hooks). Bootstrap docs: Introduction Default: "". Attribute: id.
ClassAdds raw class names to the element. Adds text directly to the class attribute. Use this for custom utility classes or project-specific overrides. Separate multiple classes with spaces. Bootstrap docs: Utilities API Default: "". Attribute: class.
BadgeThe Badge setting has no additional explanation in the component definition.
PositionOptions: Default, Prefix (first), Suffix (last) Default: "".
StyleOptions: Default, Primary (bg-primary), Secondary (bg-secondary), Success (bg-success), Danger (bg-danger), Warning (bg-warning), Info (bg-info), Light (bg-light), Dark (bg-dark), Link (bg-link), Primary Outline (bg-outline-primary), Secondary Outline (bg-outline-secondary), Success Outline (bg-outline-success), Danger Outline (bg-outline-danger), Warning Outline (bg-outline-warning), Info Outline (bg-outline-info), Light Outline (bg-outline-light), Dark Outline (bg-outline-dark), Link Outline (bg-outline-link) Default: "".
LinkSets the link destination. Sets the element's href attribute. Use absolute URLs ( https://... ) or relative paths. For internal navigation, prefer the Internal option when available. Bootstrap docs Default: "". Attribute: href.
InternalUse Internal to do partial load in the current view Uses your project's internal routing/linking mechanism instead of a raw href . This helps keep links consistent when routes or file paths change in your project. Bootstrap docs: Introduction Default: false.
TargetWhere to open the link. Controls where the link opens. Common values are _self (same tab) and _blank (new tab). If you use _blank , consider adding rel="noopener" for security. Bootstrap docs: Introduction Options: Default, _blank, _top, _self Default: "". Attribute: target.
Stretched LinkMakes the link cover its container. Expands the clickable area to cover the nearest positioned parent. This uses Bootstrap's stretched-link helper and is especially useful in cards and list items. Bootstrap docs: Stretched link Default: false.
PillDefault: false.