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

@ssvg/web-component

v0.1.0

Published

Standalone SSVG Web Component bundle for CDN usage.

Readme

SSVG Web Component

Standalone Web Component for easy sSVG compilation — ready for CDN, browser, and modern JS projects.

If you don't know about sSVG, read all about it on SimpleSVG.dev.


🚀 Quick Start (CDN)

<!-- Just one line! -->
<script src="https://unpkg.com/@ssvg/web-component/dist/ssvg-element.js"></script>

<ssvg-element>
  <var name="count" value="5"></var>
  <loop name="i" from="0" to="var(count)">
    <circle cx="calc(loop(i) * 30)" cy="50" r="10" fill="blue"/>
  </loop>
</ssvg-element>

The component will automatically replace itself with the compiled SVG.


🌍 CDN Links


🧩 How It Works

  • Place any valid sSVG markup inside <ssvg-element>...</ssvg-element>.
  • On page load, the component compiles its inner HTML using @ssvg/core and replaces itself with the resulting SVG.
  • All attributes on <ssvg-element> are passed to the root <ssvg>.

Important:

The <ssvg-element> is an HTML element, not an SVG element. This means it cannot accept self-closing tags. To ensure your markup is valid, always use explicit closing tags as required by HTML. For example:

<ssvg-element class="closing-tags">

    <import src="my-elements.ssvg" custom-function="my-function"></import>  <!-- closing tag on import -->
    
    <my-function param="30"></my-function> <!-- closing tag on custom element -->
    
    <var name="count" value="42"></var> <!-- closing tag on var -->
    
    <list name="colors">
        <item value="blue"></item> <!-- closing tags on items -->
        <item value="green"></item>
        <item value="yellow"></item>
        <item value="orange"></item>
        <item value="red"></item>
    </list>
    
    <loop from="0" to="list-action(colors, length)">
        <circle
            cx="25"
            cy="calc(loop(y) * 25)"
            r="random(5, 25)"
            fill="list(colors, [loop()])"
        ></circle> <!-- closing tag on svg elements -->
    </loop>

</ssvg-element>

Note: Using self-closing tags may cause issues. But we've got you covered: if you install the sSVG VS Code extension, it will automatically fix closing tags for all <ssvg-element> blocks in your document every time you save.


📦 Files

  • dist/ssvg-element.js — IIFE bundle for <script src=...> (CDN, browser, legacy)
  • dist/ssvg-element.esm.js — ESM bundle for import or <script type="module"> (for advanced/modern use only)

⚡ Why CDN?

This package is designed for direct use from a CDN. Just drop the script in your HTML and start using <ssvg-element>. No build tools, no npm install, no configuration.

  • No installation required
  • No bundling needed
  • Works everywhere

If you want to use it as an ESM import (for advanced use), you can, but the main use case is CDN.


❓ FAQ

Q: Can I use this with frameworks (React, Vue, etc)?
A: Yes! Just make sure the script is loaded before you use <ssvg-element>.

Q: Can I use this offline?
A: Yes, just copy the dist/ files to your project.

Q: What browsers are supported?
A: All modern browsers, and any browser that supports Custom Elements.


📚 Resources


📝 License

MIT