VariableTextContent
Prose-rendered HTML content block for rich text that arrives from CMS or external content sources.
Best for
Import
import { VariableTextContent } from "@enadhq/enad-react-sdk/client/storefront"When to use it
Use VariableTextContent when the page needs to render HTML content that already exists outside of JSX, such as CMS output or transformed editorial copy.
Composition notes
html is required and should already be sanitized and structured before it reaches the component. className gives you control over spacing and width without rebuilding the prose styling.
The component wraps the content in the shared prose typography classes and a centered width constraint, so it is best for rich text that should read like editorial copy. Use className to adjust the outer section spacing or max width, not to recreate every heading and paragraph rule from scratch.
Behavior and theming guidance
Because the component renders HTML directly, keep the source content predictable and safe. It works best for trusted editorial markup, not arbitrary user-generated HTML.
Plan the incoming markup around standard prose elements such as headings, paragraphs, lists, and links. If the CMS output needs custom embeds, product cards, or bespoke layout blocks, render those as separate components around VariableTextContent instead of packing everything into one HTML blob.
Examples
Live examples you can edit directly in the sandbox.
Rendered HTML body
Use VariableTextContent when the copy already exists as HTML and should adopt the storefront prose styling.
Slots
Component Sets
Preview the first example across the available component-set presets to compare tone, spacing, and structural defaults.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| html | string | — | No description yet. |
| classNames | Partial<Record<import("@enadhq/enad-react-sdk/client/storefront/types").VariableTextContentSlot, string>> | — | No description yet. Slot keys contentroot |
| className | string | — | No description yet. |