The Tiny, Object-Based Web Component Library

Zero dependencies. Under 1kb. No boilerplate. Just pure, native web components.

🚫

Zero Dependencies

No npm, no build steps, no headaches. Just include the script and start building.

πŸ“‰

Microscopic Size

Under 1kb gzipped. Your users won't even notice it's loaded.

🧩

Object-First API

No classes or complex lifecycles. A single config object handles everything.

βš›οΈ

Reactive State

Proxy-based reactivity automatically updates the DOM when your state changes. No manual re-renders.

πŸ”

Batched Rendering

Multiple state mutations in the same frame are coalesced into a single DOM update via requestAnimationFrame.

πŸ”‘

Keyed List Diffing

Add d-key to a d-for loop and Drow patches only the changed items β€” no full list rebuild.

How Simple Is It?

var config = { "name": "my-comp", "props": ['title', 'link'], "template": `<div> <h2>{{title}}</h2> <a href="{{link}}">Visit</a> </div>`, "css": "h2 { color: #a78bfa; }", "init": function() { // Optional initialization } } Drow.register(config);

That's All You Need

βœ“ Define a name

βœ“ List your props

βœ“ Write a template

βœ“ Add some CSS

βœ“ Register with Drow

No inheritance. No lifecycle hooks to memorize. No framework complexity.

Try It Live

This component was created with just an object definition. No complex setup required.

Global Store Sync

These two independent components share a single source of truth via Drow.store.

Dynamic Attribute Binding

The src and href attributes above are updated reactively using d-bind.

Dynamic Gallery

Iterates over objects with d-for="(img, index) in images" and uses d-key="{{img.id}}" for efficient keyed diffing.

Conditional Rendering

Uses d-if / d-else-if / d-else chaining to show different states.

Why Choose Drow?

Drow.js

  • Zero dependencies
  • Simple object syntax
  • Built-in templating & directives
  • Tiny bundle size
  • No build step needed
  • Proxy-based reactivity
  • Batched rendering
  • Keyed list diffing
  • Scoped CSS in JS
  • Simplified lifecycle hooks
  • Native web standards
  • TypeScript definitions included

React, Vue, Angular...

  • Complex dependencies
  • Class or JSX syntax
  • Multiple abstraction layers
  • Large bundle size
  • Build pipeline required
  • Custom lifecycle hooks
  • Steep learning curve
  • Overkill for components