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

@sisujs/jsx-runtime

v1.0.0

Published

A lightweight, zero-dependency JSX runtime for TypeScript and JavaScript that directly maps JSX elements to DOM elements.

Readme

SisuJs JSX -runtime

SisuJs JSX is a lightweight, zero-dependency JSX runtime for TypeScript and JavaScript. It directly maps JSX elements to DOM elements and is designed to serve as a minimal foundation for building JSX-based UI logic — whether used as-is or as part of another UI library or framework.

Core principles

The runtime is built on the following principles:

  • Focused on DOM Creation: It produces DOM elements and adds behavior to them. There is no built-in re-rendering engine, routing, or state management
  • Zero Dependencies: No external libraries or dependencies are required.
  • No Magic: What you write is what you get. There’s no hidden behavior or behind-the-scenes abstraction.
  • No Premade Handlers: You define how events (e.g., onclick) are handled.

Basic Features

  • Basic rendering happens as expected (Example)
  • React-style function-based components are supported (Example)
  • Components can be described as plain functions (Example)

Class / Object -based components

Object-based components are be created by implementing interface:

interface JSX.OnRender {
  onRender():Node
}

or just creating an object that has a function-property onRender.

Attribute Modifiers

By default, SisuJs JSX does not include any premade events or modifiers. Instead, they are added dynamically. There are two ways to do this:

Default Modifiers

By calling:

JSX.onAttributeName(attribute: string, cb: DefaultOnAttributeCallback)

a default binding is created for the given attribute name. This attribute is not rendered to the DOM tree; instead, the provided callback is executed with the attribute’s value.

By calling:

JSX.onAttributeValueType(type:Function, handler:OnAttributeCallbackHandler)

a default binding is created for the given value type of the attribute, regardless of its name. This attribute is not rendered to the DOM tree; instead, the provided callback is executed with the attribute’s value. This behavior can be used, for instance, to establish two-way communication between an element and a state using the given attribute.

Custom Modifier

To add custom behavior, you must create a class or object that implements the following interface:

interface OnAttribute {
  onAttribute(element: HTMLElement, name?: string): void;
}

Whenever the renderer encounters such an object, it executes the onAttribute function for the current element, passing the element and the attribute name as a parameter. The attribute name itself has no inherent meaning — only the provided value matters.

Attribute Naming Conventions

Because HTML attributes are case-insensitive, it is possible — either by accident or deliberately — to add the same attribute with different casing to a JSX element, this runtime normalizes all attribute names to lowercase before processing their values. If the same attribute is encountered multiple times, the behavior is undefined, but generally, the last value takes precedence.

className or class Attribute?

Handling the class attribute is an unfortunate special case. In this runtime, both className and class can be used to define the class attribute. Regardless of the original name, both are coerced to class. If both are present, the last one defined generally takes precedence.

Configuration

TypeScript

For typescript you generally need to just modify tsconfig.json and add following properties:

{
  "compilerOptions": {
    ...
    "jsx": "react-jsx",
    "jsxImportSource": "@sisujs/jsx-runtime"
  }
}

Javascript

Check the documentation of the used bundler.