Skip to content

codesparkjs/codespark

Repository files navigation

Codespark

Netlify Status

A lightweight React playground for live code editing and instant preview in your documentation.

Features

  • Modular architecture with highly customizable component styles
  • Components using popular TailwindCSS and shadcn/ui as the design system
  • Real-time preview with hot reloading
  • Automatic dependency resolution via esm.sh
  • Monaco Editor with syntax highlighting and IntelliSense
  • MDX and remark plugin integration
  • Rollup/Vite plugin for build-time processing

Installation

pnpm add @codespark/react

Usage

import { Codespark } from '@codespark/react';

const code = `export default function App() {
  return (
    <div style={{ padding: 20 }}>
      <h1>Hello World</h1>
      <p>This is my first Codes Park!</p>
    </div>
  );
}`;

export default function App() {
  return <Codespark code={code} />;
}

License

MIT

About

The way to spark you code to life

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published