Usage
Badge
Color
Size
xs
sm
md
lg
xl
Radius
xs
sm
md
lg
xl
Gradient variant
To use gradient as Badge background:
- set
variant
togradient
- set
gradient
to{ from: 'color-from', to: 'color-to', deg: 135 }
, wherecolor-from
andcolor-to
are color fromtheme.colors
deg
is linear gradient deg
Indigo cyan
Lime green
Teal blue
Orange red
Peach
Full width and overflow
Badge will take full width of container if fullWidth
prop is true
.
If badge cannot fit in its container, overflow content will be hidden with ellipsis:
Full width badge
Badge with overflow
Right and left sections
Badge with Avatar
Badge with right section
Badge with left section
Custom component
To change badge root element pass React element to component
prop:
Link badge
$$$ Get lots of money $$$
To use custom component with TypeScript provide type: