Badge - Keep React

The Badge component in the Keep React allows you to add visual indicators or labels to highlight specific information or provide additional context. With customizable options for style, size, type, icon, and state, you can create versatile badges that fit your design needs.

Table of Contents#

Default Badge#

The default badge is a versatile component that allows you to add visual indicators or labels to highlight specific information. It offers a simple yet effective way to enhance your design.

Primary
Secondary
Success
Warning
Error

Sizes of Badge#

Choose from two available sizes for the Badge component: sm (small) and md (medium). This flexibility allows you to tailor the badge to your specific design needs.

Primary
Secondary
Success
Warning
Error
Primary
Secondary
Success
Warning
Error

Variant of Badge#

The Badge component offers three variants: variant="base", variant="border", and variant="background". These variants provide options for different visual styles, allowing you to choose the one that best suits your design and effectively highlights the badge content.

Primary
Secondary
Success
Warning
Error
Primary
Secondary
Success
Warning
Error
Primary
Secondary
Success
Warning
Error

Badge With Dot#

Display a badge with a dot by setting the showIcon prop to true. Customize the position of the dot with the iconPosition prop, choosing between left and right.

Primary
Secondary
Success
Warning
Error

API Reference#

Explore the available props for the Badge component

PropertyDescriptionTypeDefault
colorAvailable Badge color.
primary
secondary
success
warning
error
primary
variantVariant the badge
base
border
background
base
sizeSize variant of the badge.
xs
sm
sm
showIconIcon show in badge show or not?booleanfalse
iconPositionPosition of the icon inside the badge.
left
right
right
classNameCustom CSS class to be added to the badge.stringNone
dotStyleCustom style to be added to the badge.stringNone