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
Prop | Type | Default | Description |
---|---|---|---|
jsx | string | The JSX string to render | |
isStreaming | boolean | false | Whether the JSX is being streamed (enables automatic tag completion) |
className | string | Additional CSS classes | |
...props | JsxParserProps | All other props from react-jsx-parser |