@atrium-ui/playground
v0.1.0
Published
Reusable browser playground for Vue JSX experiments.
Readme
@atrium-ui/playground
Reusable React playground component for editing index.html and index.tsx side by side and rendering the result into a configurable preview page.
Usage
import {
PlaygroundEditorsPanel,
PlaygroundPreviewPanel,
PlaygroundProvider,
} from "@atrium-ui/playground";
export function App() {
return (
<PlaygroundProvider previewUrl="/preview.html">
<PlaygroundEditorsPanel />
<PlaygroundPreviewPanel />
</PlaygroundProvider>
);
}The preview page must expose a #root element and any runtime dependencies your generated code needs. A minimal Vite example is included in this package via index.html and preview.html.
