RichTextRenderer

stable

Renders Lexical JSON rich text to styled HTML.

Source: packages/ui/src/components/rich-text/RichTextRenderer.tsx

Accessibility

No accessibility audit yet. Run the a11y pipeline to generate results.

Playground

Interactive playground coming soon for this component.
tsx
import { RichTextRenderer } from "@itu/ui";
 
<RichTextRenderer />
3 lines of tsx code

Props

PropTypeDefaultRequiredDescription
contentanyRequiredThe rich text content from Payload CMS Lexical editor
sizeenumlgOptionalSize variant for the prose styling
classNamestringOptionalAdditional CSS classes to apply to the wrapper
renderContent((data: any) => ReactNode)OptionalCustom render function for rich text content. If not provided, content is rendered as-is.