JSPM

  • Created
  • Published
  • Downloads 79559
  • Score
    100M100P100Q194772F
  • License MPL-2.0

ANSI to React Elements

Package Exports

  • ansi-to-react

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (ansi-to-react) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

@nteract/ansi-to-react

This package convert ANSI escape codes to formatted text output for React.

Installation

$ yarn add @nteract/ansi-to-react
$ npm install --save @nteract/ansi-to-react

Usage

The example below shows how we can use this package to render a string with ANSI escape codes.

import Ansi from "@nteract/ansi-to-react";

export function () => {
  return <Ansi>
    {'\u001b[34mnode_modules\u001b[m\u001b[m'}
  </Ansi>;
};

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:ansi-to-react label.

License

BSD-3-Clause