New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

react-text-annotate-blend

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-text-annotate-blend

React component for interactive blended text marking

latest
Source
npmnpm
Version
1.2.0
Version published
Weekly downloads
2.6K
17.55%
Maintainers
1
Weekly downloads
 
Created
Source

react-text-annotate-blend

React component library for interactive text annotations with support for overlapping annotations that blend

Check the docs!

starter code

TextAnnotateBlend

This component allows for text annotation with overlapping start and end positions. The overlap is resolved as a blend of the two tag colors to visually indicate the overlap.

TextAnnotateBlend only supports a single overlap of annotations at a given position.

Minimum Blended Annotation example:

const value = [
  {
    start: 5,
    end: 29,
    tag: "tagA",
    color: "rgb(179, 245, 66)"
  },
  {
    start: 24,
    end: 41,
    tag: "tagB",
    color: "#42f5f5"
  }
]

<TextAnnotateBlend
    content="This component lets you blend annotations!"
    value={value}
/>

TextAnnotate

TextAnnotate is a simple text annotation component bound to start and end positioning. Overlapping components is not supported.

This component extends and cleans up the TextAnnotator component from react-text-annotate.

Minimum Annotation example:

const value = [
  {
    start: 0,
    end: 14,
    tag: "tagA",
    color: "rgb(179, 245, 66)",
  },
  {
    start: 24,
    end: 41,
    tag: "tagB",
    color: "#42f5f5",
  },
]

<TextAnnotate
    content="This component lets you blend annotations!"
    value={value}
/>

FAQs

Package last updated on 18 Apr 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts