Skip to content

BadgeWrapper

A wrapper component to position a badge relative to an anchor.

  • Import
    import "@tapsioss/web-components/badge-wrapper";
  • Tag
    <tapsi-badge-wrapper></tapsi-badge-wrapper>

Properties

NameDescriptionTypeDefault Value
anchor-shapeThe shape of the anchor."rectangle" | "circle" | "pill""rectangle"
badge-sideThe horizontal placement of the badge."left" | "right""right"
badge-alignmentThe vertical alignment of the badge."top" | "middle""top"

Slots

NameDescription
-The default slot for the anchor element.
badgeThe slot for the badge to be positioned.

TIP

You can use slot names as variables:

ts
import { Slots } from "@tapsioss/web-components/badge-wrapper";

console.log(Slots.DEFAULT); // ""
console.log(Slots.BADGE); // "badge"