All Projects → Molecule-JS → MoleculeJS

Molecule-JS / MoleculeJS

Licence: Apache-2.0 license
A library for creating fast and reactive Custom Elements

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to MoleculeJS

pattern-library
AXA CH UI component library. Please share, comment, create issues and work with us!
Stars: ✭ 103 (+164.1%)
Mutual labels:  webcomponents, custom-elements, lit-html
highcharts-webcomponent
Highcharts Web Component usable with any Framework
Stars: ✭ 21 (-46.15%)
Mutual labels:  webcomponents, custom-elements, lit-html
lit-components
Moved to https://github.com/vaadin/component-mixins
Stars: ✭ 59 (+51.28%)
Mutual labels:  webcomponents, custom-elements, lit-html
Stencil
A toolchain for building scalable, enterprise-ready component systems on top of TypeScript and Web Component standards. Stencil components can be distributed natively to React, Angular, Vue, and traditional web developers from a single, framework-agnostic codebase.
Stars: ✭ 9,880 (+25233.33%)
Mutual labels:  webcomponents, custom-elements
Wired Elements
Collection of custom elements that appear hand drawn. Great for wireframes or a fun look.
Stars: ✭ 8,848 (+22587.18%)
Mutual labels:  webcomponents, lit-html
Redux Store Element
A custom element allowing a more declarative use of Redux.
Stars: ✭ 83 (+112.82%)
Mutual labels:  webcomponents, custom-elements
Crab
JavaScript library for building user interfaces with Custom Elements, Shadow DOM and React like API
Stars: ✭ 22 (-43.59%)
Mutual labels:  webcomponents, custom-elements
Nutmeg
Build, test, and publish vanilla Web Components with a little spice
Stars: ✭ 111 (+184.62%)
Mutual labels:  webcomponents, custom-elements
Calcite Components
Web Components for the Calcite Design System. Built with Stencil JS. Currently in Beta!
Stars: ✭ 96 (+146.15%)
Mutual labels:  webcomponents, custom-elements
Vaadin Combo Box
The Web Component for displaying a list of items with filtering. Part of the Vaadin components.
Stars: ✭ 113 (+189.74%)
Mutual labels:  webcomponents, custom-elements
Omi
Front End Cross-Frameworks Framework - 前端跨框架跨平台框架
Stars: ✭ 12,153 (+31061.54%)
Mutual labels:  webcomponents, custom-elements
Markuplint
A Linter for All Markup Languages.
Stars: ✭ 193 (+394.87%)
Mutual labels:  webcomponents, custom-elements
Web Components Angular React
Multiple apps as components POC
Stars: ✭ 64 (+64.1%)
Mutual labels:  webcomponents, custom-elements
Custom Element
A base class for Web Components (Custom Elements) which provides simple data binding.
Stars: ✭ 60 (+53.85%)
Mutual labels:  webcomponents, custom-elements
Aybolit
Lightweight web components library built with LitElement.
Stars: ✭ 90 (+130.77%)
Mutual labels:  webcomponents, custom-elements
Dna
Progressive Web Components.
Stars: ✭ 22 (-43.59%)
Mutual labels:  webcomponents, custom-elements
Vanilla Hamburger
Animated hamburger menu icons for modern web apps (1.8 KB) 🍔
Stars: ✭ 110 (+182.05%)
Mutual labels:  webcomponents, custom-elements
Standalone
Create framework agnostic components that are truly reusable and interoperable with all the benefits of the React ecosystem – using the HTML5 custom elements API to extend HTML's vocabulary.
Stars: ✭ 205 (+425.64%)
Mutual labels:  webcomponents, custom-elements
Awesome Polymer
A collection of awesome Polymer resources.
Stars: ✭ 384 (+884.62%)
Mutual labels:  webcomponents, custom-elements
Vanilla Colorful
A tiny color picker custom element for modern web apps (2.7 KB) 🎨
Stars: ✭ 467 (+1097.44%)
Mutual labels:  webcomponents, custom-elements

Molecule · GitHub license codecov npm version Build Status Greenkeeper badge Codacy Badge

Overview

Molecule is a JavaScript library for building user interfaces using web components.

It provides several classes from which you can build your Custom Elements

  • The Molecule base class. It is agnostic about your actual templatization and rendering function.
  • MoleculeLit class which uses the standard functions from lit-html by the Polymer team.
  • MoleculeLitExtended uses the extended rendering functions of lit-html.

Installation

The @moleculejs/molecule package can be installed using npm or yarn:

npm install --save @moleculejs/molecule
yarn add @moleculejs/molecule

Documentation

See the full documentation at MoleculeJS.org.

Examples

Let's start with a simple Example:

class HelloWorld extends MoleculeLit.Element {
  static get properties() {
    return {
      name: { type: String, attribute: true, value: 'John Doe' },
    };
  }
  render({ name }) {
    html`
      <div>Hello ${name}</div>
    `;
  }
}

customElements.define('hello-world', HelloWorld);

This creates a new Custom Element called hello-world, which can now be used anywhere in your application using <hello-world>.

This new element will also keep the property name in sync with the attribute name, meaning that the element will look like this in the DOM:

<hello-world name="John Doe"></hello-world>

If you change the attribute or the property, both will be kept in sync and the element will be rerendered.

Contributing

Coming soon!

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].