Socket
Book a DemoInstallSign in
Socket

@react-vision-components/react-vision-tags

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-vision-components/react-vision-tags

Component Library to handle Tags with confidence scores

0.9.2
latest
Source
npmnpm
Version published
Weekly downloads
6
Maintainers
1
Weekly downloads
 
Created
Source

React Vision Tags

MIT

But Why?!

Created in order to make Computer Vision tags from Azure Computer Vision more flashy for a customer and end user who likes to see different things.

Features, not bugs

  • Added tags automatically have a score of 100% by design.
  • Color of background text will(note: should) switch from black to white baste on luminence of the background that is generated.
  • More to come but it's too late and I can't remember them all :-|

Install

To install this component:

  npm i @react-vision-components/react-vision-tags

Usage

  • Create your colors
const colors:ColorSpectrum = { low: 'FF0000', mid: 'FFFF00', high: '00FF00' }
  • Set your thresholds:
const threshold:ConfidenceThreshold = { low: 70, high: 90 }
  • Create your schema:
const colorScheme:ColorInterpolatorOptions = new ColorInterpolatorOptions(colors, threshold);
  • Drop the component on your page:
<VisionTags value={item.cloudTags as Vision[]} name={tags} schema={colorScheme} placeHolder='Enter tags' />

NOTE: value is expecting an array of objects with properties "name" of type string and "confidence" and percentage as a decimal string...for example:

{
    name: 'Example',
    confidence: '0.91'
}

Authors

Keywords

React

FAQs

Package last updated on 01 Jul 2023

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

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.