Theme

PlaygroundBeta

npm_versionnpm Paragon package page

Badge

Badges are composed of text and an accompanying indicator color, and are typically used to add meaning, status, or context when paired with another component.

  • Use badges paired with another component to convey status, or provide additional details
  • Don’t use badges for freestanding text on a page

This is a pass through component from React-Bootstrap.
See React-Bootstrap for additional documentation.

Basic Usage

Any Paragon component or export may be added to the code example.

Theme Variables (SCSS)#

$badge-font-size: 75% !default;
$badge-font-weight: $font-weight-bold !default;
$badge-padding-y: .125rem !default;
$badge-padding-x: .5rem !default;
$badge-border-radius: .25rem !default;
$badge-transition: none !default;
$badge-focus-width: $input-btn-focus-width !default;
$badge-pill-padding-x: .6em !default;
$badge-pill-border-radius: 10rem !default;

Props API#

Badge Props API
  • as elementType

    Specifies element type for this component

    Default'span'
  • variant enum'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'light' | 'dark'

    Visual style of the badge

    Default'primary'
  • pill bool

    Add the pill modifier to make badges more rounded with some additional horizontal padding

    Defaultfalse
  • bsPrefix string

    Overrides underlying component base CSS class name

    Default'badge'

Usage Insights#

Badge

Project NameParagon VersionInstance Count
frontend-app-admin-portal20.26.313
frontend-app-course-authoring20.32.04
frontend-app-discussions20.15.03
frontend-app-enterprise-public-catalog20.29.014
frontend-app-learner-dashboard20.19.02
frontend-app-learner-portal-enterprise20.31.117
frontend-app-learner-record20.28.45
frontend-app-learning20.28.41
frontend-app-library-authoring20.30.12
frontend-app-ora-grading19.9.01
frontend-app-publisher20.28.51
frontend-app-support-tools20.26.03
catalog-search19.25.13
frontend-lib-content-components20.32.02
prospectus20.28.36