[]previous and next page

JSXAttributeNode

A JSX attribute such as class="a" or onClick={f}.

A JSX attribute such as class="a" or onClick={f}.

Import#

ts
import type { JSXAttributeNode } from "@shadow-js/compiler";

Signature#

ts
interface JSXAttributeNode extends PluginNode {
  /** `"JSXAttribute"`. */
  readonly type: "JSXAttribute";
  /** The attribute name. */
  readonly name: JSXIdentifierNode | JSXNamespacedNameNode;
  /** The value: a string literal, a `{}` container, a JSX element, or `null` for a bare attribute. */
  readonly value: LiteralNode | JSXExpressionContainerNode | JSXElementNode | null;
}

Members#

Name Type Description
type readonly type: "JSXAttribute" "JSXAttribute".
name readonly name: JSXIdentifierNode | JSXNamespacedNameNode The attribute name.
value readonly value: LiteralNode | JSXExpressionContainerNode | JSXElementNode | null The value: a string literal, a {} container, a JSX element, or null for a bare attribute.