v0.0.4

Badge

Installation

Install yarn add @spark-web/badge
Source GitHub.com
Bundle unpkg.com

A badge is a decorative indicator used to either call attention to an item or for communicating non-actionable, supplemental information.

Example

Label

Tones

accent
caution
critical
info
neutral

Props

Badge

PropTypeDescription

children

string | number

The label of the badge.

data?

DataAttributeMap

Sets data attributes on the component.

tone?

BadgeTones: "accent" | "caution" | "critical" | "info" | "neutral" | "positive"

The tone of the badge.

Default: "neutral"

IndicatorDot

PropTypeDescription

tone

BadgeTones: "accent" | "caution" | "critical" | "info" | "neutral" | "positive"

The tone of the indicator dot.

data?

DataAttributeMap

Sets data attributes on the component.

label?

string

When the intent isn't provided by text, you must supply an "aria-label" for assistive tech users.

© 2023 Brighte Capital Pty Ltd