Badges
Automatically included in all.css
and elements.css
. This stylesheet provides a robust set of badge styles.
import '@brainandbones/skeleton/styles/elements/badges.css';
Examples
Skeleton
♥
Complete
Skeleton
💀
♥
Favorite
Positioning
Skeleton
SupSkeleton
Sub50k
Usage
Apply to any inline element, such as a span or anchor tag.
<span class="badge bg-primary-500">Skeleton</span>
Badge Icon
A compact circular variation badge style.
<span class="badge-icon bg-primary-500">💀</span>
Overlapping Icon
Use Tailwind utility classes to create overlapping elements.
<div class="relative inline-block">
<span class="badge-icon bg-primary-500 absolute -top-1 -right-1 z-10">💀</span>
<Avatar />
</div>
Global Styles
Use your global stylesheet to update all instances of this element.
.badge { @apply rounded-full; }
Classes
Class | Description |
---|---|
badge | Provides the standard badge style. |
badge-icon | Provides the icon badge style. |