@nteract/transform-vdom

VDOM Transform for jupyter outputs

Stats

stars 🌟issues ⚠️updated 🛠created 🐣size 🏋️‍♀️
@nteract/transform-vdom
Minified + gzip package size for @nteract/transform-vdom in KB

Readme

@nteract/transform-vdom

This package contains a React component for rendering virtual DOM elements returned by libraries like vdom for Python.

Installation

$ yarn add @nteract/transform-vdom
$ npm install --save @nteract/transform-vdom

Usage

The example below shows how we can use the component within this package to render a virtual DOM contain a div with some headers and an image.

import { TransformVDOM } from "@nteract/transform-vdom";

export default () => {
  return (
    <TransformVDOM
      data={{
        tagName: "div",
        attributes: { style: { color: "DeepPink" } },
        children: [
          { tagName: "h1", attributes: {}, children: "Wahoo" },
          { tagName: "h1", attributes: {}, children: null },
          {
            tagName: "img",
            attributes: { width: "100px", height: "100px", src: "about:blank" },
            children: []
          }
        ]
      }}
    />
  );
};

Documentation

We're working on adding more documentation for this component. Stay tuned by watching this repository!

Support

If you experience an issue while using this package or have a feature request, please file an issue on the issue board and add the pkg:transform-vdom label.

License

BSD-3-Clause

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.