Skip to main content

Interface: Element<P>

core/node.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/node.ts:34


render

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

Type declaration

▸ (renderContext, logger, isAppendOnlyRender): Renderable

A function that renders this Element to a Renderable.

Parameters
NameType
renderContextRenderContext
loggerLogger
isAppendOnlyRenderboolean
Returns

Renderable

Defined in

packages/ai-jsx/src/core/node.ts:36


tag

tag: Component<P>

The tag associated with this Element.

Defined in

packages/ai-jsx/src/core/node.ts:32


[attachedContextSymbol]

Optional [attachedContextSymbol]: RenderContext

The RenderContext associated with this Element.

Defined in

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