JSX Preview

A component for rendering JSX strings as React components, with support for streaming content and automatic tag completion.

Examples

Basic JSX Preview

The JSXPreview component can render JSX strings directly into React components.

Video creation now in jul.chat

Create beautiful videos using just a prompt.
Powered by gpt-4o video generation.
Learn more

Streaming JSX Preview

The isStreaming prop enables real-time rendering of JSX as it's being streamed, with automatic tag completion.

Installation

npx shadcn add "https://prompt-kit.com/c/jsx-preview.json"

Component API

JSXPreview

PropTypeDefaultDescription
jsxstringThe JSX string to render
isStreamingbooleanfalseWhether the JSX is being streamed (enables automatic tag completion)
classNamestringAdditional CSS classes
...propsJsxParserPropsAll other props from react-jsx-parser