Theme

npm_versionnpm Paragon package page

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-portal21.13.117
frontend-app-authn22.10.01
frontend-app-course-authoring22.8.114
ora_settings22.8.11
proctoring22.8.11
xpert_unit_summary22.8.11
frontend-app-discussions22.7.03
frontend-app-ecommerce20.46.32
frontend-app-enterprise-public-catalog21.13.18
frontend-app-learner-dashboard22.9.02
frontend-app-learner-portal-enterprise21.13.120
frontend-app-learner-record22.10.05
frontend-app-learning22.8.11
frontend-app-library-authoring21.11.32
frontend-app-ora-grading21.11.31
frontend-app-payment22.9.01
frontend-app-publisher21.13.11
frontend-app-support-tools21.13.15
frontend-component-header-edx21.13.12
catalog-search21.13.14
prospectus20.46.27