UIElement Docs Version 0.11.0

πŸ“– Introduction

Enhance server-rendered pages with lightweight, self-contained Web Components. No framework, no hydration issues, no unnecessary complexity.

What is UIElement?

UIElement is a lightweight JavaScript library that lets you build interactive Web Components without requiring a full JavaScript framework like React or Vue.

It works with your existing server-rendered HTML, enhancing it with stateful, reusable components that hydrate automatically – even when inserted dynamically.

Why Use UIElement?

If you’re looking for a simple, framework-free way to add interactivity to your web pages, UIElement is the perfect fit.

How UIElement Works

UIElement extends the native HTMLElement class, letting you define custom Web Components that manage state with minimal code.

Unlike traditional frameworks that rely on a virtual DOM or dirty-checking, UIElement synchronizes automic pieces of state (signals) directly with the DOM, making fine-grained updates fast and efficient.

Example: Counter Component

Count:
Parity:

Source Code

Loading...

How UIElement Compares

  • No Virtual DOM: Builds upon server-rendered HTML and does only atomic DOM updates, avoiding unnecessary renders.
  • Minimal Overhead: Since it adds only a thin layer over native Web Standards, it has minimal bundle size and high performance.
  • Simple API: Few, clear concepts (signals, effects, context) allow developers to quickly build interactive components.

Next Steps

Continue to Getting Started, or dive into Building Components to learn more about signals and reactivity.