Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ak-badge

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ak-badge

A React component that indicates values

  • 2.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4
decreased by-42.86%
Maintainers
1
Weekly downloads
 
Created
Source

AtlasKit component registry Commitizen friendly semantic-release Report an issue Ask in our forum

Badge

Badges are visual indicators for numeric values such as tallies and scores. They're commonly used before and after the label of the thing they're quantifying. They must be used singly after a single item name, and have only numbers.

  • Use lozenges for statuses.
  • Use labels to call out tags and high-visibility attributes.
  • Use a tooltip if you want to indicate units.

Example badge

Try it out

Interact with a live demo of the ak-badge component.

Installation

npm install ak-badge

Using the component

HTML

The ak-badge package exports the Badge React component.

Import the component in your React app as follows:

import Badge from 'ak-badge';
ReactDOM.render(<Badge />, container);

AkBadge

Kind: global class

new AkBadge()

Return React class reference for the Badge component.

JS Example

import AkBadge from 'ak-badge';
ReactDOM.render(<AkBadge />, container);

akBadge.value : number

The value displayed within the badge.

Kind: instance property of AkBadge
Default: 0

akBadge.max : number

The max value to display. If value is 100, and max is 50, "50+" will be displayed

Kind: instance property of AkBadge
Default: 99

akBadge.appearance : string

Affects the visual style of the badge. Allowed values are: 'default', 'primary', 'important', 'added', 'removed'.

Kind: instance property of AkBadge
Default: "default"

akBadge.onValueUpdated : function

Handler function to be called when the 'updated' prop is changed.

Kind: instance property of AkBadge

Support and feedback

We're here to help!

Let us know what you think of our components and docs, your feedback is really important for us.

Community support

Ask a question in our forum.

Check if someone has already asked the same question before.

Create a support ticket

Are you in trouble? Let us know!

Keywords

FAQs

Package last updated on 01 Dec 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc