Counter
readyNot reviewed for a11y
This page may be removed. Primer plans to move all Rails component documentation to Lookbook.
Description
Use Counter
to add a count to navigational elements and buttons.
Accessibility
Always use Counter
with adjacent text that provides supplementary information regarding what the count is for. For instance, Counter
should be accompanied with text such as issues
or pull requests
.
Arguments
Name | Required | Description |
---|---|---|
count | Integer, Float::INFINITY, nil The number to be displayed (e.x. # of issues, pull requests) | |
scheme | Symbol Color scheme. One of | |
limit | Integer, nil Maximum value to display. Pass | |
hide_if_zero | Boolean If true, a | |
text | String Text to display instead of count. | |
round | Boolean Whether to apply our standard rounding logic to value. | |
system_arguments | Hash |