Skip to main content

Interface: Element<P>

core/core.Element

An Element represents an instance of an AI.JSX component, with an associated tag, properties, and a render function.

Type parameters

Name
P

Properties

props

props: P

The component properties.

Defined in

packages/ai-jsx/src/core/core.ts:40


render

render: (renderContext: RenderContext, logger: Logger) => Renderable

Type declaration

▸ (renderContext, logger): Renderable

A function that renders this Element to a Renderable.

Parameters
NameType
renderContextRenderContext
loggerLogger
Returns

Renderable

Defined in

packages/ai-jsx/src/core/core.ts:42


tag

tag: Component<P>

The tag associated with this Element.

Defined in

packages/ai-jsx/src/core/core.ts:38


[attachedContext]

Optional [attachedContext]: RenderContext

The RenderContext associated with this Element.

Defined in

packages/ai-jsx/src/core/core.ts:44