
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@fylgja/badge
Advanced tools
Badges component serves as a small blocks to indicate notifications. Or to highlight an item
The badges component serves as a small blocks to indicate notifications, or to highlight an item.
npm install @fylgja/badge
Then include the component in to your code via;
@use "@fylgja/badge";
// Or via PostCSS import
@import "@fylgja/badge";
To use the badge, create element with the class .badge
.
<span class="badge">..</span>
But if you need a badge with a little more complexity, like a badge with 2 sides of data or with a close button.
You can use the .badge-addon
as wrapper that binds the 2 badges to one badge.
<div class="badge-addon">
<span class="badge">New</span>
<button class="badge -theme">Close</button>
</div>
To create Badge group (Tag cloud), you need to use custom CSS or the @fylgja/utilpack
.
To create a flex-grid with gap via margin or via the gap property (when it is better supported).
<div class="flex flex-wrap">
<span class="badge m-1">Wolfs</span>
<span class="badge m-1">Cats</span>
<span class="badge m-1">Bears</span>
...
</div>
As with almost all of our components, CSS variables can be configured to add your own look/style.
Want direct control on the base styles, here are the following SCSS variables can you modify.
$badge-padding: 0.125em 0.75em !default;
$badge-radius: 0.375em !default;
$badge-bg: if($root-fg == #000, #eee, #222) !default;
$badge-color: $color-text !default;
$badge-font-size: 0.75em !default;
$badge-font-weight: 500 !default;
FAQs
Badges component serves as a small blocks to indicate notifications. Or to highlight an item
We found that @fylgja/badge demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.