type-alias / @typed/ui/Dom/Types

ElementProperties

Reactive writable properties for a DOM element, excluding events and refs.

Learn this UI primitive →

Package version
1.0.0-beta.7
Category
Host input types
Since
1.0.0

Import

import type { ElementProperties } from "@typed/ui/Dom/Types";

Signatures

export type ElementProperties<Element extends globalThis.Element> = {
    readonly [K in WritableKeys<Element> as K extends string ? K extends `on${string}` | "ref" ? never : K : never]?: RenderableInput<Element[K] | null | undefined>;
};

Why

Property assignment preserves native element behavior for values that are not accurately represented as string attributes.

Ownership and lifetime

Reactive values are subscribed within the rendered part’s Scope; the exact element remains browser-owned DOM rather than a virtual-node copy.

Other public imports

These import paths expose the same declaration. Each page retains its own public name and signature.

Source