0.1.3 • Published 3 years ago

vue-text-annotation-box v0.1.3

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

vue-text-annotation-box

A vue2 component for manual text annotation

Concept

// initial annotations:
[
  {
    word: "James",
    label: "name",
  },
];

// latest annotations:
[
  {
    word: "James",
    label: "name",
  },
  {
    word: "basketball",
    label: "sports",
  },
  {
    word: "🏀 ",
    label: "emoji",
  },
];

Installation

npm install --save vue-text-annotation-box

Demo

Try!

ES6 Modules

import textAnnotationBox from "vue-text-annotation-box";
<text-annotation-box v-model="annotations" :text="text" />

Props API

PropsDescriptionTypeMust RequiredDefault
v-model{ "word": "James", "label": "name" },{ "word": "basketball", "label": "sports" },...annotation[]yes[]
texttextStringyes
colortheme colorStringno'#577eba'
maxHeightmax height of text annotation boxString or nullnonull
# install dependencies
npm install
# compiles and hot-reloads for development
npm run serve
# compiles and minifies for production
npm run build