## class: `WyBadge`, `wy-badge`

Small badge component showing a truncated count or dot for any given count.

### Fields

| Name         | Type                  | Default    | Description                                              | Inherited From |
| ------------ | --------------------- | ---------- | -------------------------------------------------------- | -------------- |
| `appearance` | `BadgeAppearanceType` | `"count"`  | Display type for the badge                               |                |
| `position`   | `PositionType`        | `"inline"` | Positioning of the badge                                 |                |
| `reveal`     | `boolean`             | `false`    | Whether to delay showing the badge                       |                |
| `count`      |                       | `NaN`      | The number on the badge                                  |                |
| `limit`      | `number`              | `99`       | Limit for truncation. Set to Infinity for no truncation. |                |

### Attributes

| Name         | Field      | Inherited From |
| ------------ | ---------- | -------------- |
| `appearance` | appearance |                |
| `position`   | position   |                |
| `reveal`     | reveal     |                |
| `count`      | count      |                |
| `limit`      | limit      |                |

### CSS Parts

| Name                    | Description                                                                   |
| ----------------------- | ----------------------------------------------------------------------------- |
| `wy-badge`              | Root badge container.                                                         |
| `wy-badge-reveal`       | Modifier styles for revealing the badge.                                      |
| `wy-badge-dot`          | Modifier when dot appearance is used.                                         |
| `wy-badge-positioned`   | Modifier for using absolute positioning.                                      |
| `wy-badge-top-right`    | Modifier for positioning in top right corner with \`wy-badge-positioned\`.    |
| `wy-badge-top-left`     | Modifier for positioning in top left corner with \`wy-badge-positioned\`.     |
| `wy-badge-bottom-right` | Modifier for positioning in bottom right corner with \`wy-badge-positioned\`. |
| `wy-badge-bottom-left`  | Modifier for positioning in bottom left corner with \`wy-badge-positioned\`.  |

<details><summary>Private API</summary>

### Fields

| Name          | Privacy   | Type | Default                           | Description | Inherited From |
| ------------- | --------- | ---- | --------------------------------- | ----------- | -------------- |
| `exportParts` | protected |      | `new ShadowPartsController(this)` |             |                |

</details>

<hr/>

## Exports

| Kind                        | Name       | Declaration | Module                        | Package |
| --------------------------- | ---------- | ----------- | ----------------------------- | ------- |
| `js`                        | `WyBadge`  | WyBadge     | lib/components/ui/wy-badge.ts |         |
| `custom-element-definition` | `wy-badge` | WyBadge     | lib/components/ui/wy-badge.ts |         |
