@react-spectre/badge

1.0.0-16 • Public • Published

@react-spectre/badge

React components for Spectre.css's badges.




Installation

yarn add @react-spectre/badge
npm install @react-spectre/badge --save




Usage

Badges

There is 1 single component used for badges: Badge.

import { Badge } from '@react-spectre/badge'

Badges are used as wrapper components with the label property (this property is optional, badge will appear empty if the label is not specified). You can use badge for span, buttons and figures.

<Badge label={1}>
  <span>Notifications</span>
</Badge>
    
<Badge label={2}>
  <Button>Badge Button</Button>
</Badge>
  
<Badge label={11}>
  <Figure className="avatar">
    <Image
      responsive
      src="https://picturepan2.github.io/spectre/img/avatar-1.png"
    />
  </Figure>
</Badge>



Made with ❤️ by Rubens Mariuzzo.

MIT License

Readme

Keywords

none

Package Sidebar

Install

npm i @react-spectre/badge

Weekly Downloads

1

Version

1.0.0-16

License

MIT

Last publish

Collaborators

  • rmariuzzo