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-react

v0.3.3

Published

Server-render Svelte-built custom elements inside a React application.

Readme

@svebcomponents/ssr-react renders registered custom elements with declarative shadow DOM in React 19 apps. The package is in beta.

Setup

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

Route dashed JSX tags through the package runtime:

// tsconfig.json
{
  "compilerOptions": {
    "jsx": "react-jsx",
    "jsxImportSource": "@svebcomponents/ssr-react",
  },
}

Load your component package's browser entry in client code and its renderer entry on the server. Then write the element as JSX:

<my-component title="Hello" count={5} />

See the React setup guide for import placement in a server-rendered app.

Wrapper component

Use CustomElement for explicit wrapping:

import { CustomElement } from "@svebcomponents/ssr-react";

<CustomElement tag="my-component" title="Hello" count={5} />;

The server wrapper calls the registered Lit Labs ElementRenderer and places the resulting template before the light-DOM children. On the client, React renders the host tag; the browser has already parsed the shadow template. The generated extension asks Svelte to hydrate it when the element upgrades.

The registry accepts renderers from other libraries when they implement the same ElementRenderer contract.

Async components

The default wrapper uses a synchronous render path. If a component awaits during rendering, the wrapper emits the host element without shadow content and logs one warning for its tag. The browser then renders that element.

React Server Components can await the renderer:

import { CustomElement } from "@svebcomponents/ssr-react/rsc";

export default async function Page() {
  return <CustomElement tag="my-component" title="Hello" />;
}

Import /rsc from a Server Component. Client Components and plain React SSR use the synchronous wrapper. A promise-returning preparation hook needs /rsc. Enable compilerOptions.experimental.async in the component package when the Svelte component itself awaits during rendering.

Exports

| Export | Use | | ------------------------------------------- | ----------------------------------------- | | @svebcomponents/ssr-react | Synchronous CustomElement wrapper | | @svebcomponents/ssr-react/jsx-runtime | Production JSX runtime | | @svebcomponents/ssr-react/jsx-dev-runtime | Development JSX runtime | | @svebcomponents/ssr-react/rsc | Async wrapper for React Server Components |

Limits

  • Use React 19 and install Svelte in the server app.
  • The JSX runtimes route valid dashed tag names and exclude reserved SVG and MathML names.
  • The default wrapper renders async elements in the browser.
  • The /rsc wrapper cannot run inside a Client Component.
  • App code must load the component's browser entry and server renderer.

Read Async components and server data for the host support matrix.