Badge
A Badge nudges users to notify them of any action that took place or status of an element or feature. It accepts content to show a value, for example number of notifications, or text like "new" or "coming soon". You can choose to display text content in uppercase. Badges have different intents and defaults to "neutral".
Usage
import { Badge } from "@asphalt-react/badge"
<Badge />
<Badge>25</Badge>
Intents
Badge supports 6 intents:
- neutral (default): demands less user attention
- brand: brand related nudges
- danger: denotes an element of risk like deletion
- success: nudges to denote successful actions
- info: an informative nudge
- warning: demands more attention than info
Props
children
Content for Badge.
type | required | default |
---|
node | false | null |
neutral
Applies neutral intent.
type | required | default |
---|
bool | false | false |
brand
Applies brand intent.
type | required | default |
---|
bool | false | false |
danger
Applies danger intent.
type | required | default |
---|
bool | false | false |
warning
Applies warning intent.
type | required | default |
---|
bool | false | false |
info
Applies info intent.
type | required | default |
---|
bool | false | false |
success
Applies success intent.
type | required | default |
---|
bool | false | false |
uppercase
Transforms the text to uppercase.
type | required | default |
---|
bool | false | false |