Get Started
Learn the model
See how RadiantElement and RadiantController share one reactive host surface, with Signals for reactivity and JSX for TSX rendering.
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.
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>
</>
);
}
}import { RadiantCounter } from './radiant-counter';
export function Page() {
return <RadiantCounter value={0} />;
}Get Started
See how RadiantElement and RadiantController share one reactive host surface, with Signals for reactivity and JSX for TSX rendering.
Components
Use RadiantElement for custom-element hosts. Reach for RadiantController when existing markup should stay authored outside the host class.
Decorators
Typed decorators for public inputs, local state, DOM queries, events, and lifecycle across both host types.
Packages
Install Radiant with its JSX and Signals peers. Radiant and JSX share one Signals instance for reactivity.
Suggested path
Install the ecosystem
Install Radiant with its JSX and Signals peer dependencies for the standard setup.
Share state with context
Use the same context model across custom-element hosts and DOM-attached controllers.
Study a complete example
The todo app shows a render-owning RadiantElement host, child elements, context, and JSX working together.