Build reactive hosts with JSX and Signals.

Radiant gives you one reactive host model for both custom elements and DOM-attached controllers. Use RadiantElement when the host owns its contract, or RadiantController when the HTML should stay authored outside the class. Install Radiant with its JSX and Signals peer dependencies.

npm install @ecopages/radiant @ecopages/jsx @ecopages/signals
import type { JSX_PROPS } from '@ecopages/jsx';
import { RadiantElement, customElement, prop } from '@ecopages/radiant';

@customElement('radiant-counter')
export class RadiantCounter extends RadiantElement<{ value: number }> {
  declare readonly [JSX_PROPS]?: { value?: number };

  @prop({ type: Number, reflect: true }) value = 0;

  private readonly decrement = () => {
    if (this.value > 0) this.value -= 1;
  };

  private readonly increment = () => {
    this.value += 1;
  };

  override render() {
    return (
      <>
        <button type="button" on:click={this.decrement}>-</button>
        <span>{this.$.value}</span>
        <button type="button" on:click={this.increment}>+</button>
      </>
    );
  }
}
0

Get Started

Learn the model

See how RadiantElement and RadiantController share one reactive host surface, with Signals for reactivity and JSX for TSX rendering.

Components

Choose the right host

Use RadiantElement for custom-element hosts. Reach for RadiantController when existing markup should stay authored outside the host class.

Decorators

Add intent without boilerplate

Typed decorators for public inputs, local state, DOM queries, events, and lifecycle across both host types.

Packages

Understand the package layers

Install Radiant with its JSX and Signals peers. Radiant and JSX share one Signals instance for reactivity.

Suggested path

Build confidence step by step

  1. Read the overview, then install `@ecopages/radiant`, `@ecopages/jsx`, and `@ecopages/signals` for the standard setup.
  2. Start with RadiantElement when you own the custom-element contract, then learn when RadiantController is a better fit for authored DOM.
  3. Learn how signals, JSX bindings, and host decorators fit together.
  4. Use the examples to see element-owned and controller-owned flows assembled end to end.