# @iiif/presentation-3

> IIIF Presentation v3.0 typescript types

Latest version **2.2.4** (published 2026-09-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install @iiif/presentation-3
pnpm add @iiif/presentation-3
yarn add @iiif/presentation-3
bun add @iiif/presentation-3
```

## Health

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

Positive: has types; no vulnerabilities; recently updated; high maintenance score; high quality score.

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 2.2.4 |
| Published | 2026-09-15 |
| First published | 2021-03-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 111.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Stephen Fraser |
| Maintainers | sdellis, edsilv-admin, mejackreed, stephenwf, adamjarling, demiankatz, glen.robson |

## Links

- npm: https://www.npmjs.com/package/@iiif/presentation-3
- npm.io page: https://npm.io/package/@iiif/presentation-3

## Dependencies (1)

- [@types/geojson](https://npm.io/package/@types/geojson.md) ^7946.0.10

## Recent versions

- 2.2.4 (latest) — 2026-09-15
- 2.2.3 — 2024-05-26
- 2.2.2 — 2024-03-05
- 2.2.1 — 2024-03-05
- 2.2.0 — 2024-03-04
- 2.1.3 — 2023-10-02
- 2.1.2 — 2023-10-02
- 2.1.1 — 2023-10-02
- 2.1.0 — 2023-10-02
- 1.1.3 — 2022-08-23
- 1.1.2 — 2022-08-22
- 2.0.5 — 2022-07-27
- 2.0.4 — 2022-07-27
- 2.0.3 — 2022-07-27
- 2.0.2 — 2022-07-27
- … 11 more at https://npm.io/package/@iiif/presentation-3/versions

## README

# IIIF Presentation 3 types

A set of types that describe the format of the IIIF Presentation 3.0 specification as accurately as possible.

Installation:

```
$ npm i @iiif/presentation-3
```

Installation (yarn):

```
$ yarn add @iiif/presentation-3
```

Usage (Typescript):

```typescript
import { Manifest } from '@iiif/presentation-3';

const manifest = getManifestFromSomewhere() as Manifest;

function doSomethingWithManifest(manifest: Manifest) {
  // ...
}
```

Usage (Javascript):

```javascript
/**
 * @typedef { import("@iiif/presentation-3").Manifest } Manifest
 */

/**
 * @type {Manifest}
 */
const manifest = {};


/**
 * @param manifest {Manifest}
 */
function doSomethingWithManifest(manifest) {
  console.log(manifest.label);
}

// You can also inline the import:

/**
 * @type {import("@iiif/presentation-3").Manifest}
 */
const manifest2 = {};
```

This will enable types completions in VSCode and IDEA, along with inline documentation from the IIIF specification:
<img width="713" alt="Screenshot 2021-03-28 at 17 11 14" src="https://user-images.githubusercontent.com/8266711/112759081-4b651600-8fe9-11eb-83c6-9739d557716d.png" />

### Support

The following types are supported:

* Manifest
* Collection
* Canvas
* Annotation
* Annotation Collection
* Annotation Page
* Content Resource
* Provider
* Range
* Service

With some other types that aim to cover common services:

* Auth service
* GeoJSON service
* Image service
* Search service

### Full List of types

#### Basic types

| Type                       | Description                                                             |
|----------------------------|-------------------------------------------------------------------------|
| **ResourceType**           | String literals for the possible values of `type`                       |
| **InternationalString**    | Common language property (`{ "none": ["..."] }`)                        |
| **Reference**              | A reference to another resources (`{id: '..', type: '..'}`)             |
| **JsonLDContext**          | A partial of `{'@context': ... }`, extended by resources with contexts  |
| **MetadataItem**           | Label value pair used in the metadata field                             |
| **SpecificationBehaviors** | String literals for supported behaviors mentioned in the specification  |
| **SpecificationTimeMode**  | String literals for supported time modes mentioned in the specification |
| **ViewingDirection**       | String literal for the 4 supported viewing directions                   |

#### Resources

| Type                        | Description                                                                               |
|-----------------------------|-------------------------------------------------------------------------------------------|
| **Service**                 | Any service that can appear in services property. Union of generic and specific services. |
| **Manifest**                | Types for a valid IIIF Manifest                                                           |
| **Canvas**                  | Types for a valid IIIF Canvas                                                             |
| **ContentResource**         | Types for a Content Resource - warning this can be many things!                           |
| **AnnotationPage**          | Types for a valid Annotation page                                                         |
| **Annotation**              | Types for a valid Annotation in the context of a IIIF manifest                            |
| **AnnotationW3C**           | Types for a valid W3C annotation (different from above)                                   |
| **Collection**              | Types for a valid IIIF Collection                                                         |
| **Range**                   | Types for a valid IIIF Range                                                              |
| **AnnotationCollection**    | Types for a valid Annotation collection                                                   |
| **IIIFExternalWebResource** | Abstract type for an external web resource                                                |
| **ContentResourceString**   | Alias for `string`                                                                        |

#### Resource items (structural)

| Type                | Description                      |
|---------------------|----------------------------------|
| **CanvasItems**     | Alias for Annotation Page        |
| **CollectionItems** | Union of Manifest or Collection  |
| **ManifestItems**   | Alias for Canvas                 |
| **RangeItems**      | Union of Range, Canvas or string |

#### Services

| Type                                     | Description |
|------------------------------------------|-------------|
| **AuthAccessTokenServiceError**          | [todo]      |
| **AuthAccessTokenServiceResponse**       | [todo]      |
| **AuthAbstractService**                  | [todo]      |
| **AuthAccessTokenService**               | [todo]      |
| **AuthExternalService**                  | [todo]      |
| **AuthClickThroughService**              | [todo]      |
| **AuthKioskService**                     | [todo]      |
| **AuthLoginService**                     | [todo]      |
| **AuthLogoutService**                    | [todo]      |
| **AuthService**                          | [todo]      |
| **GeoJsonService**                       | [todo]      |
| **ImageService**                         | [todo]      |
| **ImageService2**                        | [todo]      |
| **ImageServiceProfile**                  | [todo]      |
| **ImageProfile**                         | [todo]      |
| **ImageService3**                        | [todo]      |
| **ImageSize**                            | [todo]      |
| **ImageTile**                            | [todo]      |
| **SearchService**                        | [todo]      |
| **SearchServiceAutocomplete**            | [todo]      |
| **SearchServiceAutocompleteQueryParams** | [todo]      |
| **SearchServiceAutocompleteResponse**    | [todo]      |
| **SearchServiceCommonHitSelectors**      | [todo]      |
| **SearchServiceCommonResources**         | [todo]      |
| **SearchServiceQueryParams**             | [todo]      |
| **SearchServiceSearchCommonSelectors**   | [todo]      |
| **SearchServiceSearchResponse**          | [todo]      |

#### W3C Annotations

Most of these types are not exported, but internally follows the full W3C specification.

[W3C Model Specification](https://www.w3.org/TR/annotation-model)

| Type                        | Description |
|-----------------------------|-------------|
| **Agent**                   | [todo]      |
| **AnnotationBody**          | [todo]      |
| **AnnotationTarget**        | [todo]      |
| **AnyMotivation**           | [todo]      |
| **Audience**                | [todo]      |
| **Body**                    | [todo]      |
| **ChoiceBody**              | [todo]      |
| **ChoiceTarget**            | [todo]      |
| **Creator**                 | [todo]      |
| **BasicState**              | [todo]      |
| **CssSelector**             | [todo]      |
| **DataPositionSelector**    | [todo]      |
| **FragmentSelector**        | [todo]      |
| **Selector**                | [todo]      |
| **RefinedBy**               | [todo]      |
| **RefinedByState**          | [todo]      |
| **EmbeddedResource**        | [todo]      |
| **ExternalResourceTypes**   | [todo]      |
| **ExternalWebResource**     | [todo]      |
| **RangeSelector**           | [todo]      |
| **RequestHeaderState**      | [todo]      |
| **SpecificResource**        | [todo]      |
| **State**                   | [todo]      |
| **SvgSelector**             | [todo]      |
| **TextPositionSelector**    | [todo]      |
| **TextQuoteSelector**       | [todo]      |
| **TimeState**               | [todo]      |
| **XPathSelector**           | [todo]      |
| **Stylesheet**              | [todo]      |
| **Target**                  | [todo]      |
| **TargetComposite**         | [todo]      |
| **TargetList**              | [todo]      |
| **TargetIndependents**      | [todo]      |
| **W3CAnnotationBody**       | [todo]      |
| **W3CAnnotationCollection** | [todo]      |
| **W3CAnnotationPage**       | [todo]      |
| **W3CAnnotationTarget**     | [todo]      |
| **W3CMotivation**           | [todo]      |
| **LinkedResource**          | [todo]      |
| **ResourceBaseProperties**  | [todo]      |
| **OtherProperties**         | [todo]      |

#### Normalized resources

The normalized types have moved
to [@iiif/presentation-3-normalized](https://github.com/IIIF-Commons/presentation-3-normalized).

#### Partial / Abstract types

These types are building blocks of other types.

| Type                      | Description                                                                       |
|---------------------------|-----------------------------------------------------------------------------------|
| **LinkingProperties**     | The linking properties of IIIF in a map `LinkingProperties['seeAlso']`            |
| **DescriptiveProperties** | The descriptive properties of IIIF in a map `DescriptiveProperties['label']`      |
| **TechnicalProperties**   | The technical properties of IIIF in a map `DescriptiveProperties['id']`           |
| **StructuralProperties**  | The structural properties of IIIF in a map `DescriptiveProperties['annotations']` |

#### Helpers

| Type               | Description                                             |
|--------------------|---------------------------------------------------------|
| **OmitProperties** | Helper for removing properties from another type        |
| **IdOrAtId**       | Helper for resources that can have either `id` or `@id` |
| **SomeRequired**   | Helper for requiring some properties from another type  |
| **Required**       | Helper for requiring all properties from another type   |

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