An easy-to-use Virtual DOM built for the web!

Welcome to diffHTML, a lightweight library for creating fast and reactive user interfaces using JavaScript. Using this tool you can create applications, games, data visualizations, and much more! It is designed to be approachable to new programmers, intermediates, and professionals.

Core features

Getting started

Depending on your project, preference, or both, you'll need to include diffHTML somehow in your code. Examples of linking using three different popular methods are available below.

Package manager

This method uses a CLI tool such as npm or yarn to download and install the package files directly in your Node-based project. This is useful for server- side applications and tools like webpack, browserify, and rollup.

Script tag

A script tag is useful for snippets, small projects, and possibly larger projects that want to have runtime control over the asset. You simply point a script tag to one of the files:

<script src="https://unpkg.com/diffhtml/dist/diffhtml.min.js"></script>

<!-- To explore the API -->

ES modules

You can import diffHTML directly over HTTP using the ES modules syntax. This is a new feature that isn't available in all browsers yet, but you can use them safely in nearly all modern browsers .

import { innerHTML } from 'https://unpkg.com/diffhtml?module';
// or
import { innerHTML } from 'https://diffhtml.org/es';


Hello World


Hacker News


Edit on GitHub