Skip to Content
🎉Introducing Pumki UI
ComponentsPreview Block

Show Code Preview to Users

A customizable code preview component for displaying code snippets with syntax highlighting.

Pumki UIPumki UI

Working Preview

Pumki UIPumki UI
Ansh Singh Sonkhia India

Installation

Usage


import { Preview, ResponsivePreview } from '@/components/pumki-ui/preview';

<Preview

title=“Working Preview” code=

>

code that renders should be here, while the one that is shown to users should be in the above block.

</Preview>

Props

PropTypeDefaultDescription
childrenReact.ReactNode-Content to render inside the preview area.
codestring-Code string to display in the code tab.
title?string-Title for the preview block.
description?string-Description for the preview block.
className?string-Additional CSS classes for the container.
showCode?booleantrueShow the code tab.
centered?booleantrueCenter the preview content.
minHeight?string”200px”Minimum height for the preview area.
previewHeight?string”-“Height for the preview area.
Last updated on