New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More

@samvera/nectar-iiif

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@samvera/nectar-iiif

ReactJS UI component library of IIIF Presentation API 3.0 property fluent primitives.


Version published
Weekly downloads
61
increased by3.39%
Maintainers
4
Weekly downloads
 
Created

Nectar IIIF

ReactJS UI component library of IIIF Presentation API 3.0 property fluent primitives.

Demo


Installation

Install the component from your command line using npm install,

npm install @samvera/nectar-iiif

OR if you prefer Yarn, use yarn add.

yarn add @samvera/nectar-iiif

Basic Usage

Add the Nectar component(s) to your jsx or tsx code.

import { Label, Summary } from "@samvera/nectar-iiif";
/**
 * Some logic may be required to fetch the IIIF Manifest.
 */
const manifest = {...};

return (
  <>
    <Label label={manifest.label} as="h1" />
    <Summary summary={manifest.summary} as="p" />
  </>
);

Primitives

Label

Reference
PropTypeDefaultRequired
as span, h1, h2, h3, h4, h5, h6, p, label, dt, ddspan--
languagestringnone--
labelInternationalString--:white_check_mark:
Usage
import { Label } from "@samvera/nectar-iiif";
return <Label label={manifest.label} as="h1" language="en" />;

Summary

Reference
PropTypeDefaultRequired
as span, h1, h2, h3, h4, h5, h6, pp--
languagestringnone--
summaryInternationalString--:white_check_mark:
Usage
import { Summary } from "@samvera/nectar-iiif";
return <Summary summary={manifest.summary} as="p" />;

Metadata

import { Metadata } from "@samvera/nectar-iiif";
return <Metadata metadata={manifest.metadata} />;

Required Statement

import { RequiredStatement } from "@samvera/nectar-iiif";
return <RequiredStatement requiredStatement={manifest.requiredStatement} />;

Homepage

import { Homepage } from "@samvera/nectar-iiif";

Wrap resource label with homepage id.

return <Homepage homepage={manifest.homepage} />;

Wrap React children with homepage id.

return (
  <Homepage homepage={manifest.homepage}>
    <figure>...</figure>
  </Homepage>
);

Keywords

FAQs

Package last updated on 20 Apr 2022

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