A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://coreui.io/react/docs/components/badge/ below:

React Badge Component - CoreUI

How to use React Badge Component.#

React badge component scales to suit the size of the parent element by using relative font sizing and em units.

Example heading New Example heading New Example heading New Example heading New Example heading New Example heading New

React badges can be used as part of links or buttons to provide a counter.

Remark that depending on how you use them, react badges may be complicated for users of screen readers and related assistive technologies.

Unless the context is clear, consider including additional context with a visually hidden piece of additional text.

Positioned#

Use position prop to modify a component and position it in the corner of a link or button.

You can also create more generic indicators without a counter using a few more utilities.

Contextual variations#

Add any of the below-mentioned color props to modify the presentation of a react badge.

primarysuccessdangerwarninginfolightdark

You can also apply contextual variations with the textBgColor property, which automatically sets the text color to ensure compliance with the WCAG 4.5:1 contrast ratio standard for enhanced accessibility.

primarysuccessdangerwarninginfolightdark

Pill badges#

Apply the shape="rounded-pill" prop to make badges rounded.

primarysuccessdangerwarninginfolightdark

API#

Check out the documentation below for a comprehensive guide to all the props you can use with the components mentioned here.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4