Counter label
Counter label is a button with a numbered label accompanied by text.
On this page
Work in progressWe are currently transferring the Rails documentation for Counter from a different site to this page. To view the original documentation, please visit the Primer ViewComponents documentation for Counter.
v0.1.5BetaNot reviewed for accessibility
Description
Use Counter to add a count to navigational elements and buttons.
Arguments
| Name | Default | Description |
|---|---|---|
count |
| Integer, Float::INFINITY, nilThe number to be displayed (e.x. # of issues, pull requests) |
scheme |
| SymbolColor scheme. One of |
limit |
| Integer, nilMaximum value to display. Pass |
hide_if_zero |
| BooleanIf true, a |
text |
| StringText to display instead of count. |
round |
| BooleanWhether to apply our standard rounding logic to value. |
system_arguments | N/A | Hash |