dlite creates Web Components and interactive web pages easily without the bloat of big frameworks. It can be effortlessly added into existing HTML pages to create reusable components for web applications. dlite is perfect for simple, but dynamic static sites or when you want to progressively enhance a site without changing too much HTML.

The code is licensed as MIT. PRs and bug reports with failing tests are extremely appreciated.

⭐ Features#

  • Seriously tiny: <10 kB (<5 kB when gzipped)

  • No dependencies, no virtual DOM, no JSX, and no build tool required

  • Reactive Web Components

  • Progressive template language that leverages template literals

  • Props

  • Computed properties

  • Two-way data binding

  • Events handling

  • Component lifecycle hooks

  • Directives (e.g. if/else, for, style, class)

  • Shadow DOM by default with scoped CSS

  • Put a script tag in your HTML and go

It is compatible with all modern browsers that support ES2015/ES6, ESM, and Proxy.

🙌 Acknowledgements#

dlite is forked from the fantastic work done by Mardix with Litedom.

It includes code from these great libraries: