@netflix/x-element
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published
  x-element
  _________
 / /__ __\ \
/ / \ \ / \ \
\ \ /_\_\ / /
 \_\_____/_/

A dead simple starting point for custom elements. It provides the following functionality:

  • Efficient element generation and data binding via an integrated templating engine
  • ...or use another engine (e.g., lit-html)
  • Automatic .property to [attribute] reflection (opt-in)
  • Automatic [attribute] to .property synchronization (one-directional, on connected)
  • Simple and efficient property observation and computation
  • Simple delegated event handling
  • Useful error messages

Installation:

curl https://raw.githubusercontent.com/Netflix/x-element/main/x-element.js > x-element.js

or

import XElement from 'https://deno.land/x/element/x-element.js';

...or if you're fancy:

npm install @netflix/x-element

Project Philosophy:

  1. No compilation step is necessary for adoption, just import x-element.js
  2. Implement a minimal set of generalized functionality
  3. Make as few design decisions as possible
  4. Presume adopters are browser experts already (stay out of their way)
  5. Follow web platform precedents whenever possible
  6. Remain compatible with any browser which fully supports custom elements
  7. Prioritize simple syntax and useful comments in the code itself
  8. Zero dependencies

Development:

npm install && npm start

Then...

See SPEC.md for all the deets.

Readme

Keywords

none

Package Sidebar

Install

npm i @netflix/x-element

Weekly Downloads

4

Version

1.0.0

License

Apache-2.0

Unpacked Size

269 kB

Total Files

59

Last publish

Collaborators

  • kkwon
  • kaylie
  • donutespresso
  • tbranyen
  • tvui-user
  • tvuiops-user
  • gsimpson
  • barb_the_builder
  • mmarchini
  • wesleytodd