npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@fylgja/callout

v1.0.1

Published

The Fylgja callout component

Readme

Fylgja Callout

NPM version NPM Downloads License

The Fylgja Callout component styles the highlighted blocks that markdown plugins generate from blockquote syntax, known as callouts, alerts, or admonitions.

Use it for notes, tips, warnings, and other remarks that need to stand apart from the surrounding prose.

Installation

You can install Fylgja Callout via npm or other Node-based package managers like pnpm or bun:

npm install @fylgja/callout

Alternatively, you can use it directly via a CDN:

<link href="https://cdn.jsdelivr.net/npm/@fylgja/callout/index.min.css" rel="stylesheet">

Usage

Once installed, you can import the full package with:

@import "@fylgja/callout";

Alternatively, if you only need specific parts, you can import them individually:

| Import Path | Description | | ------------------------ | ------------------------------------------------------------------------ | | @fylgja/callout/base | Contains the core of the Callout | | @fylgja/callout/styles | Contains the accent color for each callout type, for example tip and warning |

The component expects the structure below, where data-callout carries the type.

<div class="callout" data-callout="note">
    <p class="callout-title">
        <svg aria-hidden="true">...</svg>
        <strong>Note</strong>
    </p>
    <p>Useful information that users should know.</p>
</div>

Only three classes are shipped, callout, callout-title, and callout-fold-icon. Everything else is left to HTML, so the title takes its weight from <strong> rather than from CSS.

For Astro, the @fylgja/astro integration ships a callouts markdown plugin that renders exactly this, from GitHub alert syntax with the collapse markers of Obsidian callouts. Any other plugin works too, as long as it emits these names.

For a collapsible callout, swap the <div> for <details> and the title <p> for a <summary>. The marker the browser puts on a summary is hidden, and a .callout-fold-icon in the title turns as the callout opens. Add open to start it expanded.

<details class="callout" data-callout="warning">
    <summary class="callout-title">
        <svg aria-hidden="true">...</svg>
        <strong>Warning</strong>
        <svg class="callout-fold-icon" aria-hidden="true">...</svg>
    </summary>
    <p>Urgent info that needs immediate user attention.</p>
</details>

Styles

By default a callout is a bordered block with no background, so it sits quietly inside a body of text. A single CSS variable, --callout-style, drives the border and title color, and each type maps onto it.

Five types are provided: note, tip, important, warning, and caution. Anything unrecognized falls back to your brand color.

Icons are left to your markdown plugin. The component only keeps whatever <svg> it finds in the title from being squashed, so any icon set works. Give the icon fill="currentcolor", or stroke="currentcolor" for an outline set, and it picks up the accent color.

To restyle a type, override its color variable:

.callout {
    --callout-tip: hotpink;
}

To add a tinted background, or to change the spacing:

.callout {
    --callout-bg: color-mix(in oklab, var(--callout-style) 8%, transparent);
    --callout-px: 1.5rem;
}

Variables

| Variable | Default | Description | | ----------------------- | ------------------ | ----------------------------------------- | | --callout-style | var(--brand) | Accent color driving the border and title | | --callout-my | var(--text-flow) | Block margin around the callout | | --callout-py | 0.5rem | Block padding | | --callout-px | 1rem | Inline padding | | --callout-stroke-size | 0.25em | Border width | | --callout-bg | transparent | Background color | | --callout-gap | 0.5em | Space between the title icon and its text |

Each type also has a color variable, --callout-note through --callout-caution, set with light-dark().