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

@samvera/nectar-iiif

Package Overview
Dependencies
Maintainers
4
Versions
35
Alerts
File Explorer

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.

  • 0.0.10
  • Source
  • npm
  • Socket score

Version published
Maintainers
4
Created
Source

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

All primitives accept HTMLElement attributes.

PropTypeDefault
classNamestring, undefinedundefined
styleCSSProperties, undefinedundefined
langstring, undefinedundefined
titlestring, undefinedundefined
data-*string, undefinedundefined
aria-*AriaAttributes, undefinedundefined

The value of lang will couple with InternationalString props to output the denoted label, value, summary entries. If lang is undefined, entries will default to the first entry in the array index.

Label

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

Summary

Reference
PropTypeDefaultRequired
as span, h1, h2, h3, h4, h5, h6, pspan--
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 06 May 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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc