All Projects β†’ modulor-js β†’ modulor-html

modulor-js / modulor-html

Licence: MIT license
Missing template engine for Web Components

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to modulor-html

lego
πŸš€ Web-components made lightweight & Future-Proof.
Stars: ✭ 69 (+91.67%)
Mutual labels:  webcomponents, dom, web-components, custom-elements
Snuggsi
snuggsi ツ - Easy Custom Elements in ~1kB
Stars: ✭ 288 (+700%)
Mutual labels:  webcomponents, dom, custom-elements
crab
JavaScript library for building user interfaces with Custom Elements, Shadow DOM and React like API
Stars: ✭ 22 (-38.89%)
Mutual labels:  webcomponents, dom, custom-elements
smart-webcomponents-community
Material & Bootstrap Web Components built with Smart
Stars: ✭ 30 (-16.67%)
Mutual labels:  webcomponents, web-components, custom-elements
symbiote.js
Simple, light and very powerful library to create embedded components for any purpose, with a data flow management included.
Stars: ✭ 40 (+11.11%)
Mutual labels:  webcomponents, web-components, custom-elements
custom-elements-manifest
Custom Elements Manifest is a file format that describes custom elements in your project.
Stars: ✭ 81 (+125%)
Mutual labels:  webcomponents, web-components, custom-elements
CalDOM
An agnostic, reactive & minimalist (3kb) JavaScript UI library with direct access to native DOM.
Stars: ✭ 176 (+388.89%)
Mutual labels:  dom, web-components, custom-elements
lit-components
Moved to https://github.com/vaadin/component-mixins
Stars: ✭ 59 (+63.89%)
Mutual labels:  webcomponents, web-components, custom-elements
Aybolit
Lightweight web components library built with LitElement.
Stars: ✭ 90 (+150%)
Mutual labels:  webcomponents, web-components, custom-elements
Vanilla Hamburger
Animated hamburger menu icons for modern web apps (1.8 KB) πŸ”
Stars: ✭ 110 (+205.56%)
Mutual labels:  webcomponents, web-components, custom-elements
Nutmeg
Build, test, and publish vanilla Web Components with a little spice
Stars: ✭ 111 (+208.33%)
Mutual labels:  webcomponents, web-components, custom-elements
aurum
Fast and concise declarative DOM rendering library for javascript
Stars: ✭ 17 (-52.78%)
Mutual labels:  webcomponents, dom, web-components
cwco
Powerful and Fast Web Component Library with a Simple API
Stars: ✭ 27 (-25%)
Mutual labels:  webcomponents, web-components, custom-elements
anywhere-webcomponents
A UI work in progress based on custom elements (web components) for use in anywhere.
Stars: ✭ 17 (-52.78%)
Mutual labels:  webcomponents, web-components, custom-elements
toggle-icon
toggle-icon is a custom element created with Polymer. It provides an extremely powerful and customizable switch that looks like a paper-icon-button.
Stars: ✭ 21 (-41.67%)
Mutual labels:  webcomponents, web-components, custom-elements
Vanilla Colorful
A tiny color picker custom element for modern web apps (2.7 KB) 🎨
Stars: ✭ 467 (+1197.22%)
Mutual labels:  webcomponents, web-components, custom-elements
Server Components
πŸ”§ A simple, lightweight tool for composable HTML rendering in Node.js, based on web components.
Stars: ✭ 212 (+488.89%)
Mutual labels:  dom, web-components, custom-elements
web-components
A set of high-quality standards based web components for enterprise web applications. Part of Vaadin 20+
Stars: ✭ 322 (+794.44%)
Mutual labels:  webcomponents, web-components, custom-elements
Crab
JavaScript library for building user interfaces with Custom Elements, Shadow DOM and React like API
Stars: ✭ 22 (-38.89%)
Mutual labels:  webcomponents, dom, custom-elements
Omi
Front End Cross-Frameworks Framework - ε‰η«―θ·¨ζ‘†ζžΆθ·¨εΉ³ε°ζ‘†ζžΆ
Stars: ✭ 12,153 (+33658.33%)
Mutual labels:  webcomponents, web-components, custom-elements

modulor-html Tweet

GitHub license Codecov npm bundle size (minified + gzip) Build Status David (path)

modulor logo    Missing template engine for Web Components

import { html, render } from '@modulor-js/html';

customElements.define('my-component', class extends HTMLElement {
  set props({ first, second }){
    render(html`
      <div>first: ${first}</div>
      <div>second: ${second}</div>
    `, this);
  }
});

const first = 'foo';

render(html`
  <my-component first="${first}" second="bar"></my-conponent>
`, document.getElementById('root'));

...and much more

import { html, render } from '@modulor-js/html';

const tpl = (date) => html`
  <span>Time: ${date.toLocaleTimeString()}</span>
`;

setInterval(() => {
  render(tpl(new Date()), document.getElementById('root'));
}, 1000);

api and examples

Goals

  • Can be used in production and is already battle tested

  • Designed to be compatible with CustomElements

  • Small size (4.2kb minigzipped)

  • High performance

  • Native js syntax for templates (tagged template literals)

Installation

npm install --save @modulor-js/html

Browser support

IE >= 11 and all evergreens

Webpack loader

In real life templates can (and will) be way bigger and more complex so you might want to split them out of js code

For this case there is modulor-html-loader

Build / Test

npm run build: build the app

npm run test: test the app

Benchmark

npm run benchmark: runs node-based benchmarks

npm run benchmark:browser: runs benchmarks in browser

Issues / Bugs

Found a bug or issue? Please report it

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].