Hybrids is a JavaScript framework for client web apps, component libraries, or single components. It mixes declarative definitions built from plain objects and pure functions.
Overview
Hybrids targets authors building browser applications or reusable web components without class-heavy boilerplate. Components are defined as plain objects with pure functions where possible, while still using the standard Web Components API under the hood.
Global state uses declarative store models with async external storage, relations, and offline caching. Routing models a graph of views rather than flat URL-to-component maps, supporting optional URLs, dialogs, and guarded views. A layout engine lets you declare CSS layouts inside templates, including cases without Shadow DOM while isolating styles.
Built-in localization can auto-translate template strings, handle plurals and HTML fragments, and expose messages outside templates; a CLI extracts translatable strings from source. Hot module replacement works without extra configuration according to the docs.
Documentation at hybrids.js.org covers the component model, store, router, layout engine, localization, TypeScript usage, and migration guides for adopters.
Key features
- Plain object component model
- Web Components under the hood
- Declarative global store
- Graph-based app router
- In-template layout engine
- Template localization
- Hot module replacement
- TypeScript support
Use cases
- Single-page web applications
- Reusable component libraries
- Isolated custom elements
- Localized multi-language UIs
- Offline-friendly client state