# Badge
A versatile Badge component for labeling and categorizing content.
```jsx featured
Top Subscriber
```
```css preview
.badge[data-variant] {
--badge-color: var(--color, var(--primary));
display: flex;
align-items: center;
height: fit-content;
cursor: pointer;
border-radius: var(--lcs-radius, 1);
padding: calc(1px * var(--lcs-spacing, 1)) calc(6px * var(--lcs-spacing, 1));
gap: calc(5px * var(--lcs-spacing, 1));
font-size: small;
&[data-variant="solid"] {
border: 1px solid rgba(var(--badge-color), 0.8);
background-color: rgba(var(--badge-color), 0.7);
color: white;
}
}
```
[View Source](https://github.com/LocusInc/locus-ui/tree/main/packages/locus-ui/src/components/badge)
## Anatomy
```jsx code no-header
```
## Examples
### Variants
Badge components come with four built in variants, `solid`, `outlined`, `muted`, and `clear`.
```jsx
Solid Badge
Outlined Badge
Muted Badge
Clear Badge
```
### Colors
The badge component uses the `color` prop to allow for predefined and custom colors.
```jsx
Primary Badge
Secondary Badge
Tertiary Badge
Success Badge
Danger Badge
Warning Badge
Info Badge
```
### Sizes
To manage the size of the badge component you can provide a default or custom size through the `size` prop.
```jsx
XS Badge
SM Badge
MD Badge
LG Badge
XL Badge
```
### Color Inheritance
Works with any svg with `fill="currentColor"`.
```jsx
Verified
Verified
Verified
Verified
```