Skip to content
Theme UI
GitHub

Badge

import { Badge } from 'theme-ui'

Variants

Badge variants can be defined in theme.badges. The Badge component uses theme.badges.primary as its default variant.

// example theme variants
{
badges: {
primary: {
color: 'background',
bg: 'primary',
},
outline: {
color: 'primary',
bg: 'transparent',
boxShadow: 'inset 0 0 0 1px',
},
},
}
Edit the page on GitHub
Previous:
Avatar
Next:
Close