# `PetalComponents.Badge`
[🔗](https://github.com/petalframework/petal_components/blob/v3.2.0/lib/petal_components/badge.ex#L1)

# `badge`

## Attributes

* `size` (`:string`) - Defaults to `"md"`. Must be one of `"xs"`, `"sm"`, `"md"`, `"lg"`, or `"xl"`.
* `variant` (`:string`) - Defaults to `"light"`. Must be one of `"light"`, `"dark"`, `"soft"`, or `"outline"`.
* `color` (`:string`) - Defaults to `"primary"`. Must be one of `"primary"`, `"secondary"`, `"info"`, `"success"`, `"warning"`, `"danger"`, or `"gray"`.
* `role` (`:string`) - Defaults to `"note"`. Must be one of `"note"`, or `"status"`.
* `with_icon` (`:boolean`) - adds some icon base classes. Defaults to `false`.
* `class` (`:any`) - CSS class for parent div. Defaults to `nil`.
* `label` (`:string`) - label your badge. Defaults to `nil`.
* Global attributes are accepted.
## Slots

* `inner_block`

---

*Consult [api-reference.md](api-reference.md) for complete listing*
