Radiant

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. Signals ships with Radiant. JSX stays the optional companion for TSX.

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

@customElement('radiant-counter')
export class RadiantCounter extends RadiantElement<{ 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. Signals comes with Radiant; JSX is the TSX layer.

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

Signals ships with radiant; jsx installs alongside radiant for TSX. Both sit on the shared reactive host model.

Suggested path

Build confidence step by step

  1. Read the overview, then install `@ecopages/radiant` and `@ecopages/jsx` 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.