Badge is a small component that can be used to display status indicators, notifications, or small pieces of information. It can be positioned on any corner of its parent element and supports various styles, colors, and sizes.
button
button
<div class="badge-wrapper btn btn-primary px-2 py-1"> <p>button</p> <span class="badge top-0 left-0 bg-danger-regular-color all-border-full"> <i class="fa-solid fa-house icon-small"></i> </span> </div> <div class="badge-wrapper d-flex flex-row justify-content-center align-items-center gap-1 btn btn-primary px-2 py-1"> <p>button</p> <span class="badge-inside bg-danger-regular-color all-border-full"> <i class="fa-solid fa-house icon-small"></i> </span> </div>
Badge can be positioned using these classes:
Class | Description |
---|---|
.top-0.left-0 | Positions badge at top-left |
.top-0.right-0 | Positions badge at top-right |
.bottom-0.left-0 | Positions badge at bottom-left |
.bottom-0.right-0 | Positions badge at bottom-right |
.badge-inside | Places badge inside the element |
Available color classes for badges:
Class | Description |
---|---|
.bg-danger-regular-color | Red color for errors/danger |
.bg-warning-regular-color | Yellow color for warnings |
.bg-information-regular-color | Blue color for information |
.bg-success-regular-color | Green color for success |
Text size classes for badge content:
Class | Description |
---|---|
.txt-small | Smallest text size |
.txt-subtitle | Subtitle text size |
.txt-normal | Normal text size |
.txt-title | Title text size |
The badge component supports different layout variations:
Type | Path |
---|---|
SCSS | miz/themes/mizoon/components/badge/_index.scss |
HTML Example | miz/themes/mizoon/components/badge/index.html |
JavaScript | miz/themes/mizoon/components/badge/script.js |
$badge-size: 4px;
Currently, there is no specific JavaScript functionality for the badge component.
// No JavaScript functionality required