function / @typed/ui/index

Dom.renderDivHost

Renders a native div host from supplied props and content.

Learn this UI primitive →

Package version
1.0.0-beta.7
Category
Host rendering
Since
1.0.0
Member of
Dom

Import

import { Dom } from "@typed/ui/index";

Access Dom.renderDivHost through the imported Dom export. Its declaration below describes the member.

This public exposure is a re-export. Its import path is supported; declaration documentation is shared with the other public exposures below.

Signatures

export declare function renderDivHost<const Props extends HostProps<HTMLDivElement>, const Content extends RenderableInput>(props: Props, content: Content): HostComponent<Props | Content>;

Why

Many behavior-only components need a standards-based neutral fallback while still allowing callers to replace the host through renderHost.

Ownership and lifetime

The returned template is lazy. Its Scope owns reactive parts and the created div; it does not claim surrounding or externally supplied DOM.

Examples

import { renderDivHost } from "@typed/ui/Dom/Render"

const host = renderDivHost({ role: "group", class: "cluster" }, "Actions")

Other public imports

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

Source