Introduction#

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: ~3.6kB when gzipped

  • Reactive web components

  • Internal state manager

  • Progressive template language that leverages template literals

  • Props support

  • Lifecycle methods

  • State management

  • Computed properties

  • One-way data flow

  • Two-way data binding

  • Events handling

  • Component lifecycle hooks

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

  • Can attach to a Shadow DOM

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

  • 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:

Logo: https://openmoji.org/library/emoji-1F4A1/