1.0.14 • Published 3 years ago
@lum-ai/react-tag v1.0.14
react-tag
React components for Text Annotation Graphs (TAG)
Usage
Install the package by running:
yarn add @lum-ai/react-tag
or
npm install @lum-ai/react-tag
You can build the source code by running:
$ npm run build
The provided example can be ran with the following command:
$ npm run start-example
Embedding the component should be as easy as:
import { TAGComponent } from '@lum-ai/react-tag';
[..]
return (
<TAGComponent
width
height
topTagCategories
topLinkCategory
bottomTagCategories
bottomLinkCategory
data
format
showTopMainLabel
showTopArgLabels
linkSlotInterval
compactRows
rowVerticalPadding
containerWidth
customParsers
exportSVG
/>
);
[..]
Component parameter types:
TAGComponent.propTypes = {
width: PropTypes.number,
height: PropTypes.number,
topTagCategories: PropTypes.arrayOf(PropTypes.string),
topLinkCategory: PropTypes.string,
bottomTagCategories: PropTypes.arrayOf(PropTypes.string),
bottomLinkCategory: PropTypes.string,
data: PropTypes.shape(),
format: PropTypes.string,
showTopMainLabel: PropTypes.bool,
showTopArgLabels: PropTypes.bool,
linkSlotInterval: PropTypes.number,
compactRows: PropTypes.bool,
rowVerticalPadding: PropTypes.number,
containerWidth: PropTypes.number,
customParsers: PropTypes.arrayOf(PropTypes.shape()),
exportSVG: PropTypes.bool,
};