StaticHtml() — astro Function Reference
Architecture documentation for the StaticHtml() function in static-html.ts from the astro codebase.
Entity Profile
Dependency Diagram
graph TD f8ab4644_b292_b851_9790_d875e6e8325c["StaticHtml()"] 7c75f6a9_c903_7b77_f2b9_cea4c595b2e6["static-html.ts"] f8ab4644_b292_b851_9790_d875e6e8325c -->|defined in| 7c75f6a9_c903_7b77_f2b9_cea4c595b2e6 style f8ab4644_b292_b851_9790_d875e6e8325c fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/integrations/react/src/static-html.ts lines 10–26
const StaticHtml = ({
value,
name,
hydrate = true,
}: {
value: string | null;
name?: string;
hydrate?: boolean;
}) => {
if (!value) return null;
const tagName = hydrate ? 'astro-slot' : 'astro-static-slot';
return h(tagName, {
name,
suppressHydrationWarning: true,
dangerouslySetInnerHTML: { __html: value },
});
};
Domain
Subdomains
Source
Frequently Asked Questions
What does StaticHtml() do?
StaticHtml() is a function in the astro codebase, defined in packages/integrations/react/src/static-html.ts.
Where is StaticHtml() defined?
StaticHtml() is defined in packages/integrations/react/src/static-html.ts at line 10.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free