@leafygreen-ui/badge
TypeScript icon, indicating that this package has built-in type declarations

8.1.2 • Public • Published

Badge

npm (scoped)

Installation

Yarn

yarn add @leafygreen-ui/badge

NPM

npm install @leafygreen-ui/badge

Example

import Badge from '@leafygreen-ui/badge';

<Badge variant="blue" className="my-badge">
  New
</Badge>;

Output HTML

<div class="leafygreen-ui-rhgfxf my-badge">New</div>

Properties

Prop Type Description Default
variant 'lightgray', 'darkgray', 'red', 'blue', 'green', 'yellow' Sets the style variant of the badge. 'lightgray'
className string Adds a className to the class attribute
children node The content that will appear inside of the <Badge /> component.
... native div attributes Any other props will be spread on the root div element
darkMode boolean Determines if the component renders in dark theme false

Readme

Keywords

none

Package Sidebar

Install

npm i @leafygreen-ui/badge

Weekly Downloads

29,839

Version

8.1.2

License

Apache-2.0

Unpacked Size

55.1 kB

Total Files

24

Last publish

Collaborators

  • stephl3
  • brookescarlett
  • shaneeza
  • hswolff
  • thesonofthomp