Skip to content

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
Step-by-step guide: how to use HyperappInstall, first run, examples, tips and FAQs

How to get it

  1. 1

    Install with a package manager

    You'll need: Node.js (for npm install)

    Install from npm

    npm install hyperapp
  2. 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. 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

ProjectStarsTypeLevelUpdatedBest for
hyperapp (this)19.2kLibrarybeginner1.6 years agoDevelopers who want a very small framework for simple to medium browser apps
preact39kLibraryintermediate4 days agoWeb developers who already know React and want a lighter library
react252kLibraryintermediate6 days agoDevelopers building interactive web interfaces with JavaScript
vue212kLibraryintermediate2.1 years agoMaintaining an existing Vue 2 application that cannot yet be upgraded
svelte88.5kLibraryintermediate4 days agoDevelopers who want to build interactive websites with less boilerplate
ionic-framework52.7kLibraryintermediate4 days agoWeb 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.