0.0.2 • Published 9 months ago

react-jupyter-notebook-renderer v0.0.2

Weekly downloads
-
License
MIT
Repository
-
Last release
9 months ago

React Jupyter Notebook Renderer

A simple, unstyled React component for rendering Jupyter Notebooks.

Installation

npm install react-jupyter-notebook-renderer

Usage

import { NotebookRenderer } from "react-jupyter-notebook-renderer";

<NotebookRenderer notebookContent={notebookContent} />;

Props

  • notebookContent: The content of the notebook to render. Can be a JSON string or an object.
  • theme: The theme to use for code blocks. Code blocks are rendered with prism-react-renderer. Defaults to vsDark. Additional options can be found here.
  • classNames: Custom class names for the notebook:
    • notebookContainer
    • notebookLoading
    • notebookCell
    • notebookMarkdownCell
    • notebookCodeCell
    • notebookCellInput
    • notebookCellOutput
    • notebookOutputContainer
    • notebookOutputToggle
    • notebookOutputText
    • notebookOutputImage
    • notebookOutputStream
    • notebookOutputError
    • notebookCodeContainer
    • notebookCodeContent

Contributing

Contributions are welcome! Please open an issue or submit a PR.