This article explains how to use the Mirador viewer for displaying IIIF images.

Reference Implementation

The embedding approach is based on Stanford University Libraries’ Stanford Digital Repository. The viewer is embedded above bibliographic information, allowing metadata and images to be viewed on the same page.

File Structure

apps/ps.wureebcnbl/v/iicM.cnoil/dmromepacixodar.nolaherdtnVomtirlse//wietre.mt/sx###MEEimnrbvaeiddrodorinnmvgeinectwoemvrpaornieanbtlesettings

URL Parameters

/mirador/index.html accepts the following URL parameters:

ParameterDescriptionExample
manifestIIIF manifest URL (required). Multiple can be specified separated by semicolonshttps://example.com/iiif/manifest.json
embedEmbed mode (true hides the close button and left menu)true
themeTheme (dark or light)dark
langLanguage code (default: ja)ja, en
canvasCanvas ID for initial display-
annotationStateAnnotation display mode (true opens sidebar)true

Usage Example

/mirador/index.html?manifest=https://example.com/iiif/manifest.json&embed=true&theme=dark&lang=ja

Mirador Configuration Details

index.html Structure

<<!h/Dt<<hOmh/b/tCle<<<<ho<<<bmTammtleddssolYldeeiiayiccsd>Pa>tttnd>vrrcyEnaalk>iir>geippCih=cn>rdttopt"haMe=>ntmjamil"sf>larer=mri>"s=a"icg>e"dsr=utvota"r=irydha"e<lottuw/ertitpts"pofoihsn-rtes:8tlet/s""ety/c>"lurcenioh=ppnr"kttepgefo.n=sct"io=htm"tiwtmipnids:rt:ah/ad=/bodfsreoo@vnllituacstte.ee-g;swotiotdgdtlpihe:s,atp0/ii;mnsii.brtcoaiotdamtol/or-cm.ss:mcsia?0nlf;.eaj=mls1ie",lf>yt<s=:/hRsro0cib;rnoiktrp-oitt:g>o3h-0tf0:i,t40=0"n0>o,<"5/0d0i"v>

URL Parameter Parsing

vvf}aaorrrvviviaafafvprrraav((rrakkkvksareeeaemyyyly=iSS=e=e=!{=aa=}lr"rp;o0c"ca"c;h;hr"aa)ti=!mi=[vo<piana-]r.pr1.ssaa)s[ermlkaa[kiermiecyc.]ye]hl.(.es=p=sneaugaprdbtraaeshcrmct;ha[or(midii[]en=i.Ug/]iR().nI1;sd(){lev.ixascOlpef)l((;i0"t,=(""k,&e"y0)S);ea+rc1h));;

Window Configuration

vi}afrvvf}aaowvrrrvv}i}wiaaa;finrmarrmtondsarvahbdo[nramonuvjow"iarabima.wsmfynjfbrcsaeiiensa.=ns=f=sa[npit=eti"vu[fsms{Ilcas]ea0tdNash;s=n;:anI(ti=vvdo"vfimiab]aedags=j)rs<ena")stcit]v;{[saofi)a".rdeormsresn{sapaUtP[nlyR,o"ii.IscftlCiae(eotns"nmivt;gpoa""tons])hn:";;;e]n";itf+(a+ar)r-Srrp{aiIlygni[hititt]"im),au;lltdiipslDpeilsampyalnaciyafnetvshatussmbbnyaislesmiocnoltohnefarright

Window Behavior Settings

v}i}i}affraawwwwwllAiiiEiiwllnvnnnmvnnioonadddbaddnwworoooeroodCFtswwwdswwolua[SSS[SSwolt"eeem"eeSsliatttoetteesontttdmttt:cnniiiebiitronnn:ennitemtgggdggnreoasssS"ssgundt...i]..se:eihsdmaa,oiiep=ll=tngdfl=llrSheai=oo{utlBufwweaialy"CM,tgrttlaehOSUrox"tpiIusi]Aedeem)lne"ilB)=z{A=aeSSnr{fhhntPa=oooralwwtunsfaeeeacft;l;lluisolo=esln;ess'cabr=nuentetotnrtouanbetu;itotnosn';

Workspace Control Panel

Display control for the left menu (manifest addition, workspace management, etc.):

varworkspaceControlPanelEnabled=vars["embed"]!=="true";
  • Normal mode: true (displayed)
  • Embed mode: false (hidden)

Theme Settings

Mirador provides two themes, light and dark:

vM}ai)rrs;aeidlsoeDrca.trvekidMeTowhdeeerm(e={:viasrDsa[r"ktMhoedmee"?]"=d=a=rk""da:rk""l;ight",

To add a custom theme, use the themes option:

M}i)rst};aeh,dlec}oemu,rcesp}.tsta,ve:oltp}idmeyr,eT{:tpimwhtemaee{e:airm:rn(e'y:{:{d:a''r{#ck8u'0s,1t0o4mE'',,

Language Settings

vM}ai)rrl;aaldnaognrug.auvgaiege:ewel=ra(nv{gaurasg[e",lang"]"ja";Default:Japanese

Languages supported by Mirador: ar, de, en, fr, ja, lt, nl, pt-BR, vi, zh-CN, zh-TW, etc.

Complete Initialization Code

/mirador/index.html?manifest=https://example.com/iiif/manifest.json&embed=true&theme=dark&lang=ja

0


React Component (MiradorViewer.tsx)

Dark Mode Detection

/mirador/index.html?manifest=https://example.com/iiif/manifest.json&embed=true&theme=dark&lang=ja

1

Language Setting Retrieval

/mirador/index.html?manifest=https://example.com/iiif/manifest.json&embed=true&theme=dark&lang=ja

2

URL Generation

/mirador/index.html?manifest=https://example.com/iiif/manifest.json&embed=true&theme=dark&lang=ja

3

iframe Embedding

Set the allow="fullscreen" and allowFullScreen attributes to allow fullscreen display:

/mirador/index.html?manifest=https://example.com/iiif/manifest.json&embed=true&theme=dark&lang=ja

4


Environment Variables

Variable NameDescriptionDefault
NEXT_PUBLIC_MIRADOR_PATHBase path for Mirador/mirador/

Development and Production Environments

/mirador/index.html?manifest=https://example.com/iiif/manifest.json&embed=true&theme=dark&lang=ja

5