JSPM

  • Created
  • Published
  • Downloads 366
  • Score
    100M100P100Q84474F
  • License MIT

Tiny webcomponent lib for future-proof HTML mentors

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@polight/lego) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    Lego is a fast web-components library

    LEGO: Modern Web-Components

    LEGO (Lightweight Embedded Gluten-free Objects) is a NodeJS tool to build ๐Ÿš€ fast, โ™ป๏ธ reactive, ๐Ÿก native web-components that are easy to digest ๐ŸŒฑ for your browser.

    Lego is:

    • ๐Ÿ‘™ Minimalist: 74 61 lines of readable code in its core (non-optimised, uncompressed, no cheating).
    • ๐ŸŒฑ Low dependency: its single third-party is the minimalist Petit-Dom which itself has no dependency
    • โ™ป๏ธ Reactive: updating the state recalculate the Virtual Dom when needed
    • ๐Ÿš€ fast: using virtual dom through a thin layer makes it close to bare-metal
    • ๐Ÿ’ง Simple: that's Vanilla, there isn't much to know, it's a raw class to extend; no magic โœจ
    • ๐Ÿก Native: webcomponents are actual native webcomponents, you benefit from all the today's and tomorrow's possibilites (slot, encapsulation, โ€ฆ).

    Lego is not (and will never be):

    • ๐Ÿฏ A full bloated frontend framework with routing. Others do it well.
    • ๐Ÿ— A website builder with SSR or similar complexities.
    • ๐Ÿ” An HTML replacement that locks you into a specific technology.

    View the demo and their source ๐Ÿงช.

    Lego is inspired from the native Web-Component spec and Riot.

    It's just much lighter with simplicity, source that are easy to read, to hack and to maintain. The core lib is only 61 LOC! Lego is as light as 3Kb for the full bundle!

    Demo: view in action

    Read the full documentation at https://lego.js.org