![]() |
VOOZH | about |
Primer CSS is a free open-source CSS framework that is built upon systems that create the foundation of the basic style elements such as spacing, typography, and color. This systematic method makes sure our patterns are steady and interoperable with every other. Its approach to CSS is influenced by Object-Oriented CSS principles, functional CSS, and BEM architecture. It is highly reusable and flexible. It is created with GitHubโs design system.
Primer CSS offers a Counter component that is used to attach the count to the navigational elements or buttons. Generally, the counter has three forms i.e Counter, Counter--primary, and Counter--secondary. Note that the visibility of the counter is hidden when it is empty.
Primer CSS Counters:
Syntax:
<span class="Counter mr-1 Counter--primary"> ... </span>
Example 1: Below example demonstrates the use of Primer CSS Counters.
Output:
Example 2: Below example demonstrates the use of Primer CSS Counters on tabs.
Output:
Reference: https://primer.style/#counters