Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@asphalt-react/badge

Package Overview
Dependencies
Maintainers
7
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@asphalt-react/badge

Badge

latest
npmnpm
Version
2.15.1
Version published
Maintainers
7
Created
Source

Badge

npm npm version

A Badge nudges users to notify them of any action that took place or status of an element or feature. It accepts content to show a value, for example number of notifications, or text like "new" or "coming soon". You can choose to display text content in uppercase. Badges have different intents and defaults to "neutral". There are two types of badges:

  • Badge
  • Ribbon

Set the tailRight prop on the Ribbon Badge to control tail placement. The tail appears on the right when set, and defaults to the left when not set.

Usage

import { Badge, Ribbon } from "@asphalt-react/badge"

<Badge />

<Badge>25</Badge>
<Ribbon>New</Ribbon>

Intents

Badge supports 7 intents:

  • neutral (default): demands less user attention
  • brand: brand related nudges
  • danger: denotes an element of risk like deletion
  • success: nudges to denote successful actions
  • info: an informative nudge
  • warning: demands more attention than info
  • muted: indicates the inactive

Sizes

  • Sizes apply only to the Ribbon. It supports 5 sizes: extra small (xs), small (s), medium (m) (Default), and large (l).

Props

children

Content for Badge.

typerequireddefault
nodefalsenull

neutral

Applies neutral intent.

typerequireddefault
boolfalsefalse

brand

Applies brand intent.

typerequireddefault
boolfalsefalse

danger

Applies danger intent.

typerequireddefault
boolfalsefalse

warning

Applies warning intent.

typerequireddefault
boolfalsefalse

info

Applies info intent.

typerequireddefault
boolfalsefalse

success

Applies success intent.

typerequireddefault
boolfalsefalse

muted

Applies muted intent.

typerequireddefault
boolfalsefalse

uppercase

Transforms the text to uppercase.

typerequireddefault
boolfalsefalse

Ribbon

Props

children

Content for Ribbon.

typerequireddefault
nodefalsenull

neutral

Applies neutral intent.

typerequireddefault
boolfalsefalse

brand

Applies brand intent.

typerequireddefault
boolfalsefalse

danger

Applies danger intent.

typerequireddefault
boolfalsefalse

warning

Applies warning intent.

typerequireddefault
boolfalsefalse

info

Applies info intent.

typerequireddefault
boolfalsefalse

success

Applies success intent.

typerequireddefault
boolfalsefalse

muted

Applies muted intent.

typerequireddefault
boolfalsefalse

uppercase

Transforms the text to uppercase.

typerequireddefault
boolfalsefalse

tailRight

Enables tail on right side.

typerequireddefault
boolfalsefalse

size

Size of the Ribbon.

typerequireddefault
enumfalse"m"

Keywords

asphalt

FAQs

Package last updated on 28 Apr 2026

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