Badge
10.0.0
Badges are small status descriptors for UI elements. A badge usually consists of a small circle that appears in proximity to another object.
Namn | Typ | Beskrivning |
---|---|---|
ariaHidden | boolean | If true, the badge's label will be hidden from screen readers while remaining visually visible. |
customAttribute | { attribute: string; value: string |
number } | Used for tests. Clickable and requested subcomponents will be suffixed with "-[ComponentName]". |
isLoading | boolean | If true, a loading skeleton will be rendered instead of the component. |
lang | "sv" |
"en" | The language of the badge's label. |
negativeMargins | boolean | Negative margins. |
wrapLabel | boolean | If true, the badge's label will be wrapped to the next line if it exceeds the width of the badge. |
npm install @sj-ab/component-library.ui.badge
En Badge presenteras som vanlig text (<span>
).
Se till att informationen som presenteras i en Badge går att förstå även för användare som inte kan se eller urskilja den färgade cirkeln.
Använd inte färgen i sig för att förmedla viktig information, till exempel förseningar
Använd den färgade cirkeln som komplement och förstärkning för den synliga texten
Importer av Badge
Repos med Badge
Senaste installerade version av Badge
Äldsta installerade version av Badge