@nteract/outputs

components for rendering outputs

Usage no npm install needed!

<script type="module">
  import nteractOutputs from 'https://cdn.skypack.dev/@nteract/outputs';
</script>

README

@nteract/outputs

This package contains components for rendering different responses from a Jupyter kernel. These components provide support for rendering plain data and rich media (such as images and HTML) data.

Installation

$ yarn add @nteract/outputs
$ npm install --save @nteract/outputs

Usage

The example below shows how we can use the ExecuteResult component within this package to render the response to an execution request sent by our Jupyter kernel.

import { ExecuteResult } from "@nteract/outputs";

export default () => {
  const Plain = props => <pre>{props.data}</pre>;
  Plain.defaultProps = {
    mediaType: "text/plain"
  };

  return (
    <ExecuteResult data={{ "text/plain": "The answer to everything is 42." }}>
      <Plain />
    </ExecuteResult>
  );
};

Documentation

You can view the reference documentation for @nteract/outputs in the component docs.

Support

If you experience an issue while using this package or have a feature request, please file an issue on the issue board.

License

BSD-3-Clause