POM Framework Components Documentation GitHub
✦ v0.1.0 — Public Beta

Build once.
Use everywhere.

Custom elements that feel like native HTML.

counter.js
class CounterComponent extends Component {
  static refs = ["count", "increment", "decrement"];
  static states = {
    value: { type: Number, default: 0 },
  };

  connect() {
    this.on("increment", "click", this.handleIncrement);
    this.on("decrement", "click", this.handleDecrement);
    this.watch("value", this.handleValueChange);
  }

  handleIncrement() {
    this.value++;
  }

  handleDecrement() {
    this.value--;
  }

  handleValueChange(value) {
    this.countEl.textContent = value;
  }
}

defineElement("my-counter", {
  component: CounterComponent,
});
index.html
<my-counter>
  <my-counter-decrement>-</my-counter-decrement>
  <my-counter-count>0</my-counter-count>
  <my-counter-increment>+</my-counter-increment>
</my-counter>
styles.css
my-counter {
  display: flex;
  align-items: center;
  gap: 1rem;
}

my-counter-count {
  font-size: 2rem;
  font-weight: 600;
  min-width: 3ch;
  text-align: center;
}

my-counter-decrement,
my-counter-increment {
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid var(--color-border);
  cursor: pointer;
}
- 0 +

Framework Agnostic

Built on Web Components — works in any frontend framework, any server framework, and even mobile apps.

HTML-first

Attributes in, events out. Your components work natively with the platform — set properties from markup, listen for events from JavaScript.

Light DOM

No Shadow DOM boundary. Your elements live in the real DOM — accessible to global CSS, querySelector, and dev tools.

Declarative

Describe what your component is, not how to wire it up. The framework handles the rest.

Easy Styling

Style custom elements the same way you style native HTML — with attributes, CSS selectors, and Tailwind utilities. No shadow boundary to fight.

Unlimited Capabilities

Not limited to UI widgets. The same component model scales to any component you can imagine — a shopping cart, a multi-step wizard, or an entire data pipeline. If it has state and behavior, it can be a custom element.

AI-friendly

Structured HTML and declarative component patterns make it easy for AI to read, generate, and modify your code. One consistent shape to learn — every component follows it.