React badge component scales to suit the size of the parent element by using relative font sizing and em
units.
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