astroHTML Class — astro Architecture
Architecture documentation for the astroHTML class in astro-jsx.d.ts from the astro codebase.
Entity Profile
Dependency Diagram
graph TD b39b4e8e_2789_4e53_ef9f_ab646ffb86c0["astroHTML"] d523c4d2_c1d1_7d83_faae_8b6b7c0c800a["astro-jsx.d.ts"] b39b4e8e_2789_4e53_ef9f_ab646ffb86c0 -->|defined in| d523c4d2_c1d1_7d83_faae_8b6b7c0c800a
Relationship Graph
Source Code
packages/astro/astro-jsx.d.ts lines 11–1572
declare namespace astroHTML.JSX {
export type Child = Node | Node[] | string | number | boolean | null | undefined | unknown;
export type Children = Child | Child[];
interface ElementChildrenAttribute {
children: {};
}
interface IntrinsicAttributes extends AstroComponentDirectives, AstroBuiltinAttributes {
slot?: string | undefined | null;
children?: Children;
}
// biome-ignore format: bug
type AstroComponentDirectives = import('./dist/types/public/elements.js').AstroComponentDirectives;
type AstroBuiltinAttributes = import('./dist/types/public/elements.js').AstroBuiltinAttributes;
// biome-ignore format: bug
type AstroDefineVarsAttribute = import('./dist/types/public/elements.js').AstroDefineVarsAttribute;
type AstroScriptAttributes = import('./dist/types/public/elements.js').AstroScriptAttributes &
AstroDefineVarsAttribute;
type AstroStyleAttributes = import('./dist/types/public/elements.js').AstroStyleAttributes &
AstroDefineVarsAttribute;
type AstroSlotAttributes = import('./dist/types/public/elements.js').AstroSlotAttributes;
// This is an unfortunate use of `any`, but unfortunately we can't make a type that works for every framework
// without importing every single framework's types (which comes with its own set of problems).
// Using any isn't that bad here however as in Astro files the return type of a component isn't relevant in most cases
type Element = HTMLElement | any;
interface DOMAttributes {
children?: Children;
// Clipboard Events
oncopy?: string | undefined | null;
oncut?: string | undefined | null;
onpaste?: string | undefined | null;
// Composition Events
oncompositionend?: string | undefined | null;
oncompositionstart?: string | undefined | null;
oncompositionupdate?: string | undefined | null;
// Focus Events
onfocus?: string | undefined | null;
onfocusin?: string | undefined | null;
onfocusout?: string | undefined | null;
onblur?: string | undefined | null;
// Form Events
onchange?: string | undefined | null;
oninput?: string | undefined | null;
onreset?: string | undefined | null;
onsubmit?: string | undefined | null;
oninvalid?: string | undefined | null;
onbeforeinput?: string | undefined | null;
// Image Events
onload?: string | undefined | null;
onerror?: string | undefined | null; // also a Media Event
// Detail Events
ontoggle?: string | undefined | null;
// Keyboard Events
onkeydown?: string | undefined | null;
onkeypress?: string | undefined | null;
onkeyup?: string | undefined | null;
// Media Events
onabort?: string | undefined | null;
oncanplay?: string | undefined | null;
oncanplaythrough?: string | undefined | null;
oncuechange?: string | undefined | null;
ondurationchange?: string | undefined | null;
onemptied?: string | undefined | null;
onencrypted?: string | undefined | null;
onended?: string | undefined | null;
onloadeddata?: string | undefined | null;
onloadedmetadata?: string | undefined | null;
onloadstart?: string | undefined | null;
onpause?: string | undefined | null;
Defined In
Source
Frequently Asked Questions
What is the astroHTML class?
astroHTML is a class in the astro codebase, defined in packages/astro/astro-jsx.d.ts.
Where is astroHTML defined?
astroHTML is defined in packages/astro/astro-jsx.d.ts at line 11.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free