Badge

Badges show notifications, counts, or status information. They are compact and discreet — designed to be minimal and non-intrusive.

Usage

import {Badge} from '@smartacteam/react-native-ui';
<Badge
  variant="primary"
  label="On Hold"
  outline
  onPress={()=> {...}}
  leftIcon='...icon'
/>

Example

Preview

Props

NameTypeRequiredDescription
variant'primary' | 'secondary' | 'confirmation' | 'warning' | 'destructive'NoVisual style of the badge.
labelstringNoBadge label.
outlinebooleanNoBadge style, default is false.
leftIconIconNameNoThe icon prop must be one of icons
label_*BaseSmacTextStylingNoText style overrides for the label, e.g. label_fontSize, label_fontWeight.
onPress() => voidNoBadge action (if needed).
(…)(Inherited)Props from BaseSmacStyling, ViewProps.

See BaseSmacStyling and React Native View Props for inherited options.