Million is a lightweight (<1kb) Virtual DOM. It's really fast and makes it easy to create user interfaces.

Overview

What is Million?

Million is a lightweight (<1kb) Virtual DOM. It's really fast and makes it easy to create user interfaces.

Oh man... Another /virtual dom|javascript/gim library? I'm fine with React already, why should I bother switching?

Million makes creating user interfaces as easy as React, but with faster performance and smaller bundle size for the end user. By computing the user interface beforehand with a compiler, Million reduces the overhead of traditional Virtual DOM.

Okay cool... but why should I use Million if I can just use Preact if I need something a bit more lightweight?

While alternative libraries like Preact reduce bundle sizes by efficient code design, Million takes it a step further by leveraging compilation to make a quantum leap in improving bundle size and render speed.

Think of it as if React's API and Svelte's compiler had a baby. A baby with super speed! ๐Ÿ‘ถ ๐Ÿš€

๐Ÿ“š Learn Million in 1 minute! โ†’

Why Million?

Advantages

Use Cases

  • โš›๏ธ Familiar React API (with million/react)
  • ๐Ÿฆ Built for libraries that compile
  • ๐Ÿ“ฆ Lightweight bundle size (<1kb brotli+min)
  • โšก Fast runtime operations
  • ๐Ÿ› ๏ธ Composable using drivers, sensible by default

Note: Million now supports experimental React compatibility.

Installing Million

Inside your project directory, run the following command:

npm install million

Codebase

This repo is a "mono-repo" with modules. Million ships as one NPM package, but has first class modules for more complex, but important extensions. Each module has its own folder in the /packages directory.

Module Description
million The main Virtual DOM with all of Million's core.
react A module that gives React compatability for Million.
router A module that enables SPA routing for MPAs.
jsx-runtime A module that provides JSX runtime utilities
html A module that provides factory functions and tagged template for easier virtual node creation (JSX alternative)
morph A module for morphing HTML with just DOM nodes (like morphdom) inside the page. Works great for implementing hot refresh in SSR frameworks
utils A module that provides conversion utilities for virtual nodes, DOM nodes, and HTML strings
vite-plugin-million A Vite plugin that optimizes virtual node tree ("the compiler")

Resources & Contributing Back

Looking for the docs? Check the documentation out.

Want to talk to the community? Hop in our Discord and share your ideas and what you've build with Million.

Have a question about Million? Post it on the Discord or GitHub Discussions and ask the community for help.

Find a bug? Head over to our issue tracker and we'll do our best to help. We love pull requests, too!

We expect all Million contributors to abide by the terms of our Code of Conduct.

โ†’ Start contributing on GitHub

Acknowledgments

Million takes heavy inspiration from snabbdom, ivi, mikado, and more. Feel free to check them out if you're interested in an alternative library to use.

Million is being used at companies like Wyze and open source work like Quartz, TinyPages, and more.

Sponsors

Theatre.js Vercel Deta

Want your logo here? โ†’ Sponsor Million

License

Million is MIT-licensed open-source software and research project by Aiden Bai.

View count

You might also like...

Tiny JavaScript library (1kB) by CurrencyRate.today, providing simple way and advanced number, money and currency formatting and removes all formatting/cruft and returns the raw float value.

Zero dependency tiny JavaScript library (1kB bytes) by CurrencyRate.today, providing simple way and advanced number, money and currency formatting and removes all formatting/cruft and returns the raw float value.

Nov 8, 2022

Flutter makes it easy and fast to build beautiful apps for mobile and beyond

Flutter makes it easy and fast to build beautiful apps for mobile and beyond

Flutter is Google's SDK for crafting beautiful, fast user experiences for mobile, web, and desktop from a single codebase. Flutter works with existing

Jan 7, 2023

Pure and simple virtual DOM library

Maquette Maquette is a Javascript utility which makes it easy to synchronize the DOM tree in the browser with your data. It uses a technique called 'V

Jan 4, 2023

Builds components using a simple and explicit API around virtual-dom

Etch is a library for writing HTML-based user interface components that provides the convenience of a virtual DOM, while at the same time striving to

Dec 15, 2022

Atomico a micro-library for creating webcomponents using only functions, hooks and virtual-dom.

Atomico a micro-library for creating webcomponents using only functions, hooks and virtual-dom.

Atomico simplifies learning, workflow and maintenance when creating webcomponents. Scalable and reusable interfaces: with Atomico the code is simpler

Dec 31, 2022

I forgot about el.outerHTML so I made this, it takes a DOM element and returns its html as string

I forgot about el.outerHTML so I made this, it takes a DOM element and returns its html as string

htmlToString Convert html/DOM element to string Works with rendered and virtual DOM Installation npm install htmltostring Or using CDN script src="ht

Jul 22, 2022

minimalist virtual dom library

petit-dom A minimalist virtual DOM library. Supports HTML & SVG elements. Supports Render functions and Fragments. Custom components allows to build y

Dec 12, 2022

Javascript (TypeScript) library for building web user interfaces

ivi ยท ivi is a javascript (TypeScript) library for building web user interfaces. Status Maintenance mode. Bug fixes and documentation updates only. Qu

Dec 19, 2022

Dyo is a JavaScript library for building user interfaces.

Dyo A JavaScript library for building user interfaces. Installation Use a Direct Download: script src=dyo.js/script Use a CDN: script src=unpkg.c

Dec 23, 2022
Owner
Derek Jones
Perfection is not attainable, but if we chase perfection we can catch excellence
Derek Jones
In 2012 the King of Spain, Juan Carlos I, transferred 65 million euros to a friend from a secret account in Switzerland. What lies actually behind this rare donation? This repository contains the full source code of the website ladonacion.es.

La Donaciรณn full source code and documentation This documentation draft is a work in progress. I expect to have it completed by September 24, 2022. โญ

Jaime Gรณmez-Obregรณn 119 Dec 24, 2022
A Fast & Light Virtual DOM Alternative

hyper(HTML) ?? Community Announcement Please ask questions in the dedicated discussions repository, to help the community around this project grow โ™ฅ A

Andrea Giammarchi 3k Dec 30, 2022
Component oriented framework with Virtual dom (fast, stable, with tooling)

Bobril Main site bobril.com Changelog of npm version: https://github.com/Bobris/Bobril/blob/master/CHANGELOG.md Component oriented framework inspired

Boris Letocha 359 Dec 4, 2022
1kb js library contains development debugging, error monitoring and reporting, user problem localization features

1kb js library contains development debugging, error monitoring and reporting, user problem localization features

่…พ่ฎฏ AlloyTeam 1.4k Dec 22, 2022
โœ๏ธ Super lightweight JSX syntax highlighter, around 1KB after minified and gzipped

Sugar High Introduction Super lightweight JSX syntax highlighter, around 1KB after minified and gzipped Usage npm install --save sugar-high import { h

Jiachi Liu 67 Dec 8, 2022
Types generator will help user to create TS types from JSON. Just paste your single object JSON the Types generator will auto-generate the interfaces for you. You can give a name for the root object

Types generator Types generator is a utility tool that will help User to create TS Interfaces from JSON. All you have to do is paste your single objec

Vineeth.TR 16 Dec 6, 2022
It's a repository to studies. Its idea is to learn about Nx and its plugins.

StudyingNx This project was generated using Nx. ?? Smart, Fast and Extensible Build System Adding capabilities to your workspace Nx supports many plug

Open-ish 4 May 13, 2022
Can see everything, beware of its omniscience, kneel before its greatness.

Can see everything, beware of its omniscience, kneel before its greatness. Summary Presentation Installation Removing Credits Presentation Main goal T

Duc Justin 3 Sep 30, 2022
An easy to implement marquee JQuery plugin with pause on hover support. I know its easy because even I can use it.

Simple-Marquee Copyright (C) 2016 Fabian Valle An easy to implement marquee plugin. I know its easy because even I can use it. Forked from: https://gi

null 16 Aug 29, 2022
A Minimalist to do list website where user can add, remove and edit multiple tasks and All the changes user makes in his to do list is saved in browser local storage so that it can be accessed later.

Testing for Add Remove function in To Do List App Jest framework is used for testing. Created (addremove.test.js) for a file containing the add item a

Krishna Prasad Acharya 8 Aug 15, 2022