Start sharing components as a team!Share components as a team!Join Bit to build your applications faster.Get Started Free

badge

v3.9.2arrow_drop_down
v3.9.2
STATUS
Passing
DOWNLOADS
326
LICENSE
MIT
VISIBILITY
Public
PUBLISHED
7 months ago
SIZE
21 KB
Badge generates a small badge to the top-right of its child(ren).
1 contributor
Use badge in your project ?
Copied
npm i @bit/mui-org.material-ui.badge
Set Bit as a scoped registryLearn more
npm config set '@bit:registry' https://node.bit.dev
Component Example
React
React
Vue
Angular
Add dependency... help_outline
Just
import
any of the 1 million components
and packages in Bit or NPM to the example.
import Button from '@bit/grommet.grommet.button';
import Lodash from 'lodash';
revert changes
reload
toggle layout
maximize
modifieddraft
modifieddraft
modifieddraft
modifieddraft
modifieddraft
modifieddraft
modifieddraft
modifieddraft
modifieddraft
modifieddraft
chevron_left
chevron_right
Properties
NameTypeDefault valueDescription
badgeContent
node

The content rendered within the badge.

children
node

The badge will be added relative to this node.

classes
object

Override or extend the styles applied to the component. See CSS API below for more details.

className
string
color
'default' | 'primary' | 'secondary' | 'error''default'

The color of the component. It supports those theme colors that make sense for this component.

component
custom'span'

The component used for the root node. Either a string to use a DOM element or a component.

invisible
bool

If true, the badge will be invisible.

max
number99

Max count to show.

showZero
boolfalse

Controls whether the badge is hidden when badgeContent is zero.

variant
'standard' | 'dot''standard'

The variant to use.