Examples
Props
Badge
Name | Type | Default | Description |
---|---|---|---|
children | React.ReactNode | '' | content rendered inside the Badge |
className | string | '' | additional classes added to the Badge |
isDisabled | boolean | false | Adds styling to the badge to indicate it is disabled |
isRead | boolean | false | Adds styling to the badge to indicate it has been read |
screenReaderText | string | Text announced by screen readers to indicate the current content/status of the badge. |
CSS variables
Expand or collapse column | Selector | Variable | Value | |
---|---|---|---|---|
.pf-v6-c-badge | --pf-v6-c-badge--BorderColor | transparent | ||
.pf-v6-c-badge | --pf-v6-c-badge--BorderWidth | 1px | ||
| ||||
.pf-v6-c-badge | --pf-v6-c-badge--BorderRadius | 999px | ||
| ||||
.pf-v6-c-badge | --pf-v6-c-badge--FontSize | 0.75rem | ||
| ||||
.pf-v6-c-badge | --pf-v6-c-badge--FontWeight | 500 | ||
| ||||
.pf-v6-c-badge | --pf-v6-c-badge--PaddingInlineEnd | 0.5rem | ||
| ||||
.pf-v6-c-badge | --pf-v6-c-badge--PaddingInlineStart | 0.5rem | ||
| ||||
.pf-v6-c-badge | --pf-v6-c-badge--Color | (In light theme) #151515 | ||
| ||||
.pf-v6-c-badge | --pf-v6-c-badge--MinWidth | 2rem | ||
| ||||
.pf-v6-c-badge | --pf-v6-c-badge__toggle-icon--MarginInlineStart | 0.25rem | ||
| ||||
.pf-v6-c-badge | --pf-v6-c-badge__toggle-icon--Color | (In light theme) #1f1f1f | ||
| ||||
.pf-v6-c-badge | --pf-v6-c-badge--m-read--BackgroundColor | (In light theme) #e0e0e0 | ||
| ||||
.pf-v6-c-badge | --pf-v6-c-badge--m-read--Color | (In light theme) #151515 | ||
| ||||
.pf-v6-c-badge | --pf-v6-c-badge--m-read__toggle-icon--Color | (In light theme) #1f1f1f | ||
| ||||
.pf-v6-c-badge | --pf-v6-c-badge--m-unread--BackgroundColor | (In light theme) #0066cc | ||
| ||||
.pf-v6-c-badge | --pf-v6-c-badge--m-unread--Color | (In light theme) #ffffff | ||
| ||||
.pf-v6-c-badge | --pf-v6-c-badge--m-unread__toggle-icon--Color | (In light theme) #ffffff | ||
| ||||
.pf-v6-c-badge | --pf-v6-c-badge--m-disabled--Color | (In light theme) #4d4d4d | ||
| ||||
.pf-v6-c-badge | --pf-v6-c-badge--m-disabled--BorderColor | (In light theme) #a3a3a3 | ||
| ||||
.pf-v6-c-badge | --pf-v6-c-badge--m-disabled--BackgroundColor | (In light theme) #c7c7c7 | ||
| ||||
.pf-v6-c-badge.pf-m-read | --pf-v6-c-badge--Color | (In light theme) #151515 | ||
| ||||
.pf-v6-c-badge.pf-m-read | --pf-v6-c-badge--BackgroundColor | (In light theme) #e0e0e0 | ||
| ||||
.pf-v6-c-badge.pf-m-read | --pf-v6-c-badge__toggle-icon--Color | (In light theme) #1f1f1f | ||
| ||||
.pf-v6-c-badge.pf-m-unread | --pf-v6-c-badge--Color | (In light theme) #ffffff | ||
| ||||
.pf-v6-c-badge.pf-m-unread | --pf-v6-c-badge--BackgroundColor | (In light theme) #0066cc | ||
| ||||
.pf-v6-c-badge.pf-m-unread | --pf-v6-c-badge__toggle-icon--Color | (In light theme) #ffffff | ||
| ||||
.pf-v6-c-badge.pf-m-disabled | --pf-v6-c-badge--Color | (In light theme) #4d4d4d | ||
| ||||
.pf-v6-c-badge.pf-m-disabled | --pf-v6-c-badge--BackgroundColor | (In light theme) #c7c7c7 | ||
|