
Security News
Feross on Risky Business Weekly Podcast: npm’s Ongoing Supply Chain Attacks
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.
@workday/canvas-kit-css-badge
Advanced tools
The count badge provides a quantity-based summary with dynamic values.
yarn add @workday/canvas-kit-css
or
yarn add @workday/canvas-kit-css-badge
Add your node_modules
directory to your SASS includePaths
. You will then be able to import
index.scss
.
@import '~@workday/canvas-kit-css-badge/index.scss';
A common use case for the count badge is for displaying notifications, and there are several accessibility concerns you'll want to keep in mind:
aria-hidden
<button type="button" aria-label="Alerts 3 new notifications">
<svg aria-hidden="true" focusable="false">...</svg>
<span class="wdc-count-badge" aria-hidden="true">3</span>
</button>
<div class="wdc-accessible-hide" role="status" aria-live="polite" aria-atomic="true">
New notifications
</div>
Note: To use the
wdc-accessible-hide
class, you'll need to import it from the core module.
@import '~@workday/canvas-kit-css-core/lib/accessibility.scss';
<span class="wdc-count-badge">
1
</span>
<span class="wdc-count-badge-inverse">
2
</span>
Badges with more than 999 notifications should display '999+'
<span class="wdc-count-badge">
999+
</span>
FAQs
provides a summary indicator with dynamic values
We found that @workday/canvas-kit-css-badge demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
Research
/Security News
Ongoing npm supply chain attack spreads to DuckDB: multiple packages compromised with the same wallet-drainer malware.