---
title: "Homepage"
description: "A IIIF resource's homepage, the web pages about it, as a list of links, each named by its label."
url: https://clover.iiif.library.northwestern.edu/docs/primitives/homepage
version: "4"
---

# Homepage

\<Clover.Homepage /> (web components: \<clover-homepage>)0.7 kB added to a page with a Root, gzipped (web components: 7 kB added to a page with a \<clover-root>, styles included, gzipped)

The web pages about the resource, as a list of links.

> **Example**: a live example on the page, showing sample IIIF data. What it shows is demonstration content, not about Clover; its code, where the page gives it, follows.

**React**

```jsx
<Clover.Root iiifContent={url}>
  <Clover.Homepage />
</Clover.Root>
```

**Web components**

```html
<clover-root
  iiif-content="https://clover.iiif.library.northwestern.edu/mocks/paged/manifest.json">
  <clover-homepage></clover-homepage>
</clover-root>
```

## API reference

Reads `homepage` from the Root’s resource and renders a `ul`: a link to each page, named by its label or else its address, with its `format` after it. It renders nothing while there is none, and its other props go to the `ul`.

**React**

| Prop        | Type                      | Default      | Description                                                       |
| ----------- | ------------------------- | ------------ | ----------------------------------------------------------------- |
| `of`        | `"manifest" \| "canvas"`  | `"manifest"` | Whose `homepage`: the resource’s, or the Canvas the reader is on. |
| `value`     | `{ id, label, format }[]` | —            | Pages to show instead of the Root’s, as IIIF gives them.          |
| `className` | `string`                  | —            | Added to `clover-homepage`.                                       |

**Web components**

### `<clover-homepage>`

The homepage: the resource's own web page, as a list of links.

| Name     | Type                                                                                         | Default    | Description                                                                                |
| -------- | -------------------------------------------------------------------------------------------- | ---------- | ------------------------------------------------------------------------------------------ |
| `of`     | `"manifest" \| "canvas"`                                                                     | `manifest` | Whose property: the Manifest's, or the Canvas in view's.                                   |
| `value`  | `string (a URL or JSON)`                                                                     | —          | Homepages, instead of the root's: as text, a URL or JSON. Outside a root, the one to show. |
| `.value` | `string \| Array<{ id: string; label?: Record<string, string[]>; format?: string }> \| null` | —          | As a property: Homepages, instead of the root's.                                           |

## Examples

### Several pages

A resource can have more than one homepage, and each is a link. This film’s are on Wikimedia Commons and in the National Archives Catalog.

> **Example**: a live example on the page, showing sample IIIF data. What it shows is demonstration content, not about Clover; its code, where the page gives it, follows.

**React**

```jsx
<Clover.Root iiifContent="https://clover.iiif.library.northwestern.edu/mocks/rudolf-hess-nuremberg/manifest.json">
  <Clover.Homepage />
</Clover.Root>
```

**Web components**

```html
<clover-root
  iiif-content="https://clover.iiif.library.northwestern.edu/mocks/rudolf-hess-nuremberg/manifest.json">
  <clover-homepage></clover-homepage>
</clover-root>
```

### Outside a Root

Give it `value`, the pages as IIIF gives them, and it needs no `Root` (web components: `<clover-root>`).

> **Example**: a live example on the page, showing sample IIIF data. What it shows is demonstration content, not about Clover; its code, where the page gives it, follows.

**React**

```jsx
<Clover.Homepage
  value={[
    {
      id: "https://catalog.archives.gov/id/23769",
      type: "Text",
      label: { en: ["National Archives Catalog"] },
      format: "text/html",
    },
  ]}
/>
```

**Web components**

```html
<clover-homepage
  value='[{"id":"https://catalog.archives.gov/id/23769","type":"Text","label":{"en":["National Archives Catalog"]},"format":"text/html"}]'></clover-homepage>
```

## Previous versions

[Clover 3.x › Homepage](https://clover.iiif.library.northwestern.edu/docs/deprecated-versions/homepage)

- A list, a link for each page, rather than one link.
- `homepage` is `value`: inside a `Root` (web components: `<clover-root>`), leave it out.
- Each link is an `a`, named by its label: no `as` or children.
