
Hyperapp
A tiny JavaScript framework for building browser apps with a virtual DOM.
- Stars
- 19.2k
- Forks
- 778
- Licence
- MIT
- Language
- JavaScript
- Last update
- 1.6 years ago
- Type
- Library
No commits in over a year — check for forks or alternatives before adopting.
What it is
Hyperapp is a small JavaScript library for building interactive web pages and apps. You describe what the page should look like from your current state, and it updates the real page when that state changes. The README says it is about 1 kB and can be loaded directly in a script tag without a build step.
- Build a to-do list that updates as the user types and clicks
- Write interactive page sections using h() and text() instead of HTML templates
- Add timed or event-driven updates using the official time and events packages
Great for
- Developers who want a very small framework for simple to medium browser apps
- People who like a functional style with plain state and actions
- Developers who want to try a framework without setting up a build tool
Not ideal for
- Teams that need a large ecosystem of ready-made components, since the README lists several official packages as planned and points to third-party collections
- Non-programmers, since it requires writing JavaScript
How to get it
- 1
Install with a package manager
You'll need: Node.js (for npm install)
Install from npm
npm install hyperapp - 2
Run it
- Install with npm install hyperapp, or load it from a CDN in a script tag.
- Create a page with an element that has an id, such as main id="app".
- Call app() with init state, a view function, and the node to render into.
- Open the page in a browser and interact with it.
- 3
Get the most out of it
- Read the Tutorial in docs/tutorial.md for a step-by-step guide
- Use the Reference in docs/reference.md to learn how to write custom effects and subscriptions
- Browse the Hyperawesome collection for third-party packages and real-world examples
- Try the official Examples on CodePen to see common patterns
Downloads
Strengths
- Very small size, stated as about 1 kB
- Few concepts to learn: views, actions, effects, and subscriptions
- Works with no build step by loading it from a CDN
Trade-offs
- Several official packages (http, random, navigation) are listed as planned, not finished
- Ecosystem is smaller than larger frameworks; third-party packages are found in a separate collection
- The README does not detail production usage or browser support
How it compares
| Project | Stars | Type | Level | Updated | Best for |
|---|---|---|---|---|---|
| hyperapp (this) | 19.2k | Library | beginner | 1.6 years ago | Developers who want a very small framework for simple to medium browser apps |
| preact | 39k | Library | intermediate | 4 days ago | Web developers who already know React and want a lighter library |
| react | 252k | Library | intermediate | 6 days ago | Developers building interactive web interfaces with JavaScript |
| vue | 212k | Library | intermediate | 2.1 years ago | Maintaining an existing Vue 2 application that cannot yet be upgraded |
| svelte | 88.5k | Library | intermediate | 4 days ago | Developers who want to build interactive websites with less boilerplate |
| ionic-framework | 52.7k | Library | intermediate | 4 days ago | Web developers who want to build mobile apps using existing web skills |
Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.