Skip to content

@arcmantle/lit-jsx / shared/jsx-core

shared/jsx-core

Namespaces

Variables

as

as: object

Defined in: shared/jsx-core.ts:167

Type Declaration

bool()

bool: (value) => boolean

Informs the compiler that the value should be bound as a boolean attribute.
This allows the template to bind the value using the ? syntax, e.g. ?disabled=${true}
This function call is removed during compilation, therefore it has no runtime effect.

Parameters
value

boolean

Returns

boolean

prop()

prop: <T>(value) => T

Informs the compiler that the value should be bound as a property value.
This binds the expression value as a property, using the . syntax e.g .key=${value}
This function call is removed during compilation, therefore it has no runtime effect.

Type Parameters
T

T

Parameters
value

T

Returns

T

tag()

tag: <Tag>(tag) => DynamicTag<Tag>

Creates a component-like value for an intrinsic tag, so it can be used in JSX as a dynamic tag identifier.

The returned component requires static. Example: const Tag = as.tag('a');

Type Parameters
Tag

Tag extends TagName

Parameters
tag

Tag

Returns

DynamicTag<Tag>

Released under the Apache-2.0 License.