Badge

Badges serve the purpose of swiftly indicating the status of an item.

React

Is new design vision part implemented using new tokens?

Up to date

Resources

Example


                                                        
                                                        
                                                            import { Badge } from '@optimus-web/core';
                                                        
                                                        <Badge content={3}>
                                                          <Button>Open List</Button>
                                                        </ Badge>
                                                        
                                                            

API

Name

Description

Type

Default

active?

Shows or hides the badge

boolean

true

content?

The content of the badge

number | string

undefined

children?

Content that you want to wrap with a badge

React.ReactChild

-

offset?

Number of pixels you want to offset the badge on the child

number

undefined

outline?

Gives the badge a white outline (only use on BareIconButton and IconButton ghost variant children)

boolean

undefined

variant?

Defines the variant of the badge

'default' | 'success' | 'warning' | 'danger' | 'info' | 'subtle'

'default'