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

m-badge

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

m-badge

badge in mobile

  • 1.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Badge


徽章用于表示一个入口的信息提示。

何时使用

标记了一个信息提示,表示有未关注的内容。

API

  • 通过设置 Badge 的属性来产生不同的徽章样式,推荐顺序为:bgcolor -> color

  • 徽章的属性说明如下:

属性说明类型默认值
bgcolor设置徽章提示的背景色,可选值为任何合法的CSS颜色值stringundefined
color设置徽章提示的字体色,可选值为任何合法的CSS颜色值stringundefined
  • <Badge/> 因为没有子内容,会渲染为一个小红点,可以通过bgcolor属性改为任意颜色的圆点
  • <Badge>1</Badge>,<Badge>New</Badge> 因为传入了子内容,会展示为一个徽章提示

Keywords

FAQs

Package last updated on 25 Jul 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