Theme Playground

Storefront

VariableTextContent

Prose-rendered HTML content block for rich text that arrives from CMS or external content sources.

Best for

CMS rich texteditorial body copyexternally managed HTML

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.

1 example

Rendered HTML body

Use VariableTextContent when the copy already exists as HTML and should adopt the storefront prose styling.

Slots

contentroot

Component Sets

Preview the first example across the available component-set presets to compare tone, spacing, and structural defaults.

Props

PropTypeDefaultDescription
htmlstring
No description yet.
classNamesPartial<Record<import("@enadhq/enad-react-sdk/client/storefront/types").VariableTextContentSlot, string>>
No description yet.
Slot keys
contentroot
classNamestring
No description yet.