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

5.1.6 • Public • Published

@react-md/badge

A badge is a floating element that is normally fixed to another element to add additional information. The biggest use-case for a badge is to show a count of notifications.

Installation

npm install --save @react-md/badge

If you would also like dynamic themes and general typography, it is recommended to also install:

npm install --save @react-md/theme \
  @react-md/typography

Documentation

You should check out the full documentation for live examples and more customization information, but an example usage is shown below.

Usage

import { render } from "react-dom";
import { BadgedButton } from "@react-md/badge";

const App = () => <BadgedButton id="notifications">3</BadgedButton>;

render(<App />, document.getElementById("root"));

Package Sidebar

Install

npm i @react-md/badge

Weekly Downloads

1,201

Version

5.1.6

License

MIT

Unpacked Size

66.3 kB

Total Files

51

Last publish

Collaborators

  • mlaursen