Badge

Badge is a label that indicates version number, status or importance. It can be used to highlight a piece of information or draw attention to a particular item in a color-assisted manner.

v1.2ReleasedDeprecatedUpdatesNot found!Done
MDC
:badge[v1.2]

:badge[Deprecated]{type="warning"}

::badge{type="danger"}
Not found!
::

::badge{type="success"}
Done
::

Props

PropsTypeDefaultDescription
typeStringprimaryType of the badge. Possible values: success, warning, danger, info, primary, secondary, neutral

Slots

SlotDescription
defaultContent of the badge

Design Tokens

tokens.config.ts
import { defineTheme } from 'pinceau'

export default defineTheme({
  elements: {
    badge: {
      paddingX: '{space.2}', 
      paddingY: '{space.1}', 
      fontSize: '{text.base.fontSize}', 
      fontWeight: '{fontWeight.normal}', 
      lineHeight: '{typography.lead.none}', 
      letterSpacing: '{letterSpacing.tight}', 
      borderRadius: '{elements.radii.base}', 
      borderWidth: '1px', 
      borderStyle: 'solid', 
      boxShadow: 'inset 0.25px 0.5px 0px hsla(0,0%,100%,.1), inset -0.25px 0px 0px hsla(0,0%,100%,.1)',
    },
  }
})