v1.14.1

Sharing Content

Use IIIF Content State to share a selected view of a work. A compatible viewer can open the same Canvas from the shared link.

This example uses The town & pass of Boondi, in Rajpootana from the British India art demo. Its source Manifest contains one Canvas, labeled “recto.”

Share a view

Open the work and select Share in the viewer. Include the current view in the share options, then copy the link. Readers who follow it open the work at that view.

Embed the view in a page

Copy the value of the shared link's iiif-content query parameter into the Viewer component's iiifContent prop. This example opens the print's recto:

content/about/boondi-view.mdx
---title: A View of Boondi--- # A View of Boondi Explore the print from Northwestern University Libraries. <Viewer iiifContent="JTdCJTIyaWQlMjIlM0ElMjJodHRwcyUzQSUyRiUyRmFwaS5kYy5saWJyYXJ5Lm5vcnRod2VzdGVybi5lZHUlMkZhcGklMkZ2MiUyRmZpbGUtc2V0cyUyRjEzOGE5NGIwLTE3NWEtNDE1Mi05OGM3LWRmNTg2NjFjZTdkNSUzRmFzJTNEaWlpZiUyMiUyQyUyMnR5cGUlMjIlM0ElMjJDYW52YXMlMjIlMkMlMjJwYXJ0T2YlMjIlM0ElNUIlN0IlMjJpZCUyMiUzQSUyMmh0dHBzJTNBJTJGJTJGYXBpLmRjLmxpYnJhcnkubm9ydGh3ZXN0ZXJuLmVkdSUyRmFwaSUyRnYyJTJGd29ya3MlMkY0YmRiNWEyMi02YzdmLTQ5OGQtOGU2ZS1lNDllYTliYzQ3NzglM0ZhcyUzRGlpaWYlMjIlMkMlMjJ0eXBlJTIyJTNBJTIyTWFuaWZlc3QlMjIlN0QlNUQlN0Q" />

The encoded value contains this Canvas reference. Both IDs come from the provider's Manifest:

{  "id": "https://api.dc.library.northwestern.edu/api/v2/file-sets/138a94b0-175a-4152-98c7-df58661ce7d5?as=iiif",  "type": "Canvas",  "partOf": [    {      "id": "https://api.dc.library.northwestern.edu/api/v2/works/4bdb5a22-6c7f-498d-8e6e-e49ea9bc4778?as=iiif",      "type": "Manifest"    }  ]}

IIIF Content State uses URL-safe Base64 encoding to carry JSON in a link. See the encoding specification for details.