Security News
Highlights from the 2024 Rails Community Survey
A record 2,709 developers participated in the 2024 Ruby on Rails Community Survey, revealing key tools, practices, and trends shaping the Rails ecosystem.
@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 and other options as plain CSS
@import "@fylgja/badge/badge.css";
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;
[1.0.0] - 2021-06-22
Initial Release 🎉
FAQs
Badges component serves as a small blocks to indicate notifications. Or to highlight an item
The npm package @fylgja/badge receives a total of 41 weekly downloads. As such, @fylgja/badge popularity was classified as not popular.
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
A record 2,709 developers participated in the 2024 Ruby on Rails Community Survey, revealing key tools, practices, and trends shaping the Rails ecosystem.
Security News
In 2023, data breaches surged 78% from zero-day and supply chain attacks, but developers are still buried under alerts that are unable to prevent these threats.
Security News
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.