This package contains a full set of transforms for rendering plain-text and rich media within nteract applications. Note that unlike the
@nteract/transforms-full package, this package does not contain transforms for Plotly, Vega, and GeoJSON
$ yarn add @nteract/transforms
$ npm install --save @nteract/transforms
The example below shows how to use the standard set of transforms to render plain text and image data.
;// Jupyter style MIME bundleconst bundle ="text/plain": "This is great""image/png": "R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7";// Find out which mimetype is the richestconst mimetype =;// Get the matching React.Component for that mimetypelet Transform = standardTransformsmimetype;// Create a React elementreturn <Transform data=bundlemimetype />;
The following example shows how you can extend the set of transforms with your own unique transforms. This allows you to create custom renders for different media types.
consttransformsdisplayOrder=...const Transform = transformsmimetype;
We're working on adding more documentation for this component. Stay tuned by watching this repository!
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