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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@lumeland/ssx

v0.1.13

Published

Fast and simple JSX library for server side

Downloads

166

Readme

SSX

JSX is terrible for frontend. But it's an acceptable way to create HTML code in server side, specially if it's supported by default by TypeScript and Deno.

Most of the current JSX libraries are designed to work in server and client sides. They do complicated things like a virtual DOM, reactivity, hooks, hydration, events, etc, in order to create interactive user interfaces.

SSX is a minimal JSX library designed to be used ONLY in server side and output plain HTML code.

  • Created in TypeScript, for Deno.
  • Very fast. It's compatible with the precompile option available in Deno.

    7-20x faster rendering times and a 50% reduction in Garbage Collection times.

  • Run deno task bench to compare SSX with React, Hono and Preact.
  • Designed to output HTML. It uses real HTML attributes (no more className).
  • Great HTML and CSS documentation. Every element and property has a description and even links to MDN documentation. Types are generated using the data from VSCode Custom Data.
  • It supports async components (components returning a Promise).
  • Allows to insert raw HTML code easily (without patronizing you).
  • You can add the <!doctype html> declaration.

Configuration

In your deno.json file:

{
  "compilerOptions": {
    "jsx": "react-jsx",
    "jsxImportSource": "ssx"
  },
  "imports": {
    "ssx/jsx-runtime": "https://deno.land/x/ssx/jsx-runtime.ts"
  }
}

Alternatively, you can use JsDelivr as CDN.

Using NPM specifier

SSX is also published on NPM as @lumeland/ssx:

{
  "compilerOptions": {
    "jsx": "react-jsx",
    "jsxImportSource": "npm:@lumeland/ssx"
  }
}

Use with Node and Bun

If you want to use SSX with Node.js or Bun, see the /node folder for an example setup using this package in a Node environment.

Example:

// Main component
function Main() {
  return (
    <div id="main">
      <Header>
        <p>Welcome to SSX</p>
        {{ __html: "Raw <b>HTML</b> code" }}
      </Header>
    </div>
  );
}

// Async component
async function Header({ children }: { children: JSX.Children }) {
  const res = await fetch(
    `https://api.dictionaryapi.dev/api/v2/entries/en/${name}`,
  );

  const json = await res.json();
  const def = json[0]?.meanings[0]?.definitions[0]?.definition;

  return (
    <>
      <h2>Definition of {name}:</h2>
      <p>{def || "Definition not found"}</p>
      {children}
    </>
  );
}

// String with the HTML code
console.log(await Main());

Adding Doctype:

Any child with the shape { __html: string } is treated as raw HTML and will not be escaped. This allows you to insert the <!doctype html> declaration directly (something not possible in other JSX libraries):

{{ __html: "<!DOCTYPE html>" }}
<html>
  ...
</html>;