# @ghentcdh/annotated-text

Latest version **1.3.1** (published 2026-11-12) · 0 weekly downloads

## Install

```sh
npm install @ghentcdh/annotated-text
pnpm add @ghentcdh/annotated-text
yarn add @ghentcdh/annotated-text
bun add @ghentcdh/annotated-text
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; recently updated; high maintenance score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 1.3.1 |
| Published | 2026-11-12 |
| First published | 2025-08-27 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 5 |
| Unpacked size | 830.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 4 |
| Author | GhentCDH |
| Maintainers | flamsens, joren_gcdh, bo_firepeak |

## Links

- npm: https://www.npmjs.com/package/@ghentcdh/annotated-text
- Repository: https://github.com/GhentCDH/annotated-text
- npm.io page: https://npm.io/package/@ghentcdh/annotated-text

## Dependencies (5)

- [d3](https://npm.io/package/d3.md) 7.9.2
- [memoizee](https://npm.io/package/memoizee.md) ^0.4.17
- [tokenizr](https://npm.io/package/tokenizr.md) 2.2.1
- [lodash-es](https://npm.io/package/lodash-es.md) ^4.17.21
- [@ghentcdh/w3c-utils](https://npm.io/package/@ghentcdh/w3c-utils.md) ^1.1.1

## Recent versions

- 1.3.1 (latest) — 2026-11-12
- 1.3.0 — 2026-11-10
- 1.2.0 — 2026-11-10
- 1.1.1 — 2026-10-05
- 1.1.0 — 2026-10-01
- 1.0.11 — 2026-08-24
- 1.0.10 — 2026-05-27
- 1.0.9 — 2026-05-27
- 1.0.8 — 2026-05-21
- 1.0.7 — 2026-05-20
- 1.0.6 — 2026-04-20
- 1.0.5 — 2026-03-27
- 1.0.4 — 2026-03-27
- 1.0.3 — 2026-03-26
- 1.0.2 — 2026-03-26
- … 42 more at https://npm.io/package/@ghentcdh/annotated-text/versions

## README

![NPM Version](https://img.shields.io/npm/v/%40ghentcdh%2Fannotated-text?link=https%3A%2F%2Fwww.npmjs.com%2Fpackage%2F%40ghentcdh%2Fannotated-text)
[![Build](https://github.com/GhentCDH/annotated-text/actions/workflows/merge-request.yml/badge.svg)](https://github.com/GhentCDH/annotated-text/actions/workflows/merge-request.yml)
[![Publish](https://github.com/GhentCDH/annotated-text/actions/workflows/publish.yml/badge.svg)](https://github.com/GhentCDH/annotated-text/actions/workflows/publish.yml)

# Component annotated text

This repository contains a reusable Javascript component to visualize text annotations on web pages. It can be used for
linguistic analysis, text structure or other annotations on unicode text. It is best explained by the following
screenshots:

![Annotations](../../docs/_media/annotations.png)

![Edit](../../docs/_media/editAnnotation.png)

Following text formats are supported:

- Plain text
- Text divided in lines
- Markdown text

  or Create your own text adapter

Following annotation formats are supported:

- W3C Web Annotation format
- Custom annotation format

  or Create your own annotation adapter

## Usage

## Documentation

To build the docs run `npx nx run docs:build` or access [Github Docs](https://ghentcdh.github.io/annotated-text)

## Creating a new release

Documentation on releases can be found
on: [Release documentation](https://ghentcdh.github.io/annotated-text/release/)

## Minimal working example

More Information in
the [Getting started documentation](https://ghentcdh.github.io/annotated-text/components/-getting-started/quikstart.html)

```scss
@use '@ghentcdh/annotated-text/style.css' as *;
```

````html

<div :id="id"></div>
````

```ts
import { createAnnotatedText } from "@ghentcdh/annotated-text";

const id = `annotated-text-{uuid}`;

const textAnnotation = createAnnotatedText(id)
  .setText(text)
  .setAnnotations(annotations);
```

## Credits

Built @ the [Ghent Center For Digital Humanities](https://www.ghentcdh.ugent.be/), Ghent University by:

* Pieterjan De Potter
* Frederic Lamsens
* Joren Six
* Jahid Chetti
* Bo Vandersteene

Development by [Ghent Centre for Digital Humanities - Ghent University](https://www.ghentcdh.ugent.be/). Funded by
the [GhentCDH research projects](https://www.ghentcdh.ugent.be/projects).

<img src="https://www.ghentcdh.ugent.be/ghentcdh_logo_blue_text_transparent_bg_landscape.svg" alt="Landscape" width="500">

---
_Source: https://npm.io/package/@ghentcdh/annotated-text · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
