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

@svebcomponents/ssr-astro

v0.2.3

Published

Server-render Svelte-built custom elements inside an Astro application.

Downloads

751

Readme

@svebcomponents/ssr-astro renders registered custom elements with declarative shadow DOM in Astro pages. The package is in beta.

Setup

pnpm add @svebcomponents/ssr @svebcomponents/ssr-astro svelte

Add the integration:

import svebcomponents from "@svebcomponents/ssr-astro";
import { defineConfig } from "astro/config";

export default defineConfig({
  integrations: [svebcomponents()],
});

Load the server entries from Astro frontmatter. Put the browser entry in a processed script so Astro includes it in the client bundle:

---
import "my-component-package/ssr";
---

<script>
  import "my-component-package";
</script>

<my-component title="Hello" count="5">
  <p>Light-DOM child</p>
</my-component>

Astro ships no host runtime for this element. The browser parser attaches the server-rendered shadow root, and the component's browser class upgrades and hydrates it.

See the Astro setup guide for project layout and island behavior.

Async components

Astro can await the wrapper and promise-returning preparation hooks. Enable compilerOptions.experimental.async in the component package when the Svelte component itself awaits during rendering.

Exports and options

| Export | Use | | ------------------------------------- | --------------------------------- | | @svebcomponents/ssr-astro | Astro integration | | @svebcomponents/ssr-astro/vite | Vite transform for custom setups | | @svebcomponents/ssr-astro/component | Wrapper that the integration uses |

Pass tags to limit which custom elements the integration renders:

svebcomponents({ tags: ["my-component", "my-dialog"] });

Limits

  • Use Astro 5 and install Svelte in the server app.
  • The integration transforms .astro templates. It does not cover MDX.
  • A custom element inside a React, Vue, or Svelte client:* island belongs to that framework's render tree. Configure the matching host integration there.
  • App code must load the component's browser entry and server renderer.

Read Async components and server data for server data hooks and host support.