Gluonjs
A lightweight library for building web components and applications
- Platform Based: GluonJS is designed to leverage the latest web platform capabilities, making it extremely small in size, and very performant on modern browsers. Additionally, it means that build/compile steps are optional; GluonJS components work on modern browsers without any pre-processing.
- Component Model: Build components with encapsulated logic and style, then compose them to make complex interfaces. Uses the Web Component standard, with all related APIs available directly to developers.
- Highly Reusable: Because GluonJS creates standards-compliant Web Components, you can use components created with GluonJS in almost any existing application. Check Custom Elements Everywhere for up-to-date compatibility tables with existing frameworks.
- Powerful Templating: GluonJS uses lit-html for templating, making it highly expressive and flexible.
Examples
Here is an example of a GluonJS component:
// helloMessage.js; { return html`Hello `; } customElements;
We can import and use this component from anywhere:
<!-- index.html -->
This example will render "Hello John" on the page.
Documentation
Coming soon
Installation
GluonJS is available through npm as gluonjs
.
Compatibility
Chrome | Safari | Edge | Firefox | IE |
---|---|---|---|---|
✔ | ✔ | * | * † | * † ‡ |
* Requires Web Component polyfill
† Requires ES6 Module bundling
‡ Pending IE support in lit-html
Contributing
All work on GluonJS happens in the open on Github. A development environment is available at localhost:5000
with npm install && npm run dev
, or make dev
if you use Docker. All issue reports and pull requests are welcome.
License
Copyright © 2017-present, Goffert van Gool