---
title: "Hero Cover Module for Sanity + Next.js"
description: "A full-width hero with copy over a background image, an optional mobile image, adjustable opacity, and horizontal and vertical alignment."
---

# Hero (cover) module

A full-width hero with copy over a background image. Align the copy horizontally and vertically, fade the image, and swap in a separate mobile image.

[View source on GitHub](https://github.com/nuotsu/sanitypress/tree/main/src/modules/hero.cover) (schema + React component)

## Module fields

| Field | Type | Description |
| --- | --- | --- |
| `eyebrow` | string | Small label shown above the copy. |
| `content` | Portable Text | Hero copy. Supports rich text, images with alt text, and Custom HTML blocks. |
| `ctas` | array of `cta` | Call-to-actions below the copy. |
| `image` | image | Background image. See image fields below. |
| `verticalAlign` | `top` \| `center` \| `bottom` | Defaults to `center`. |
| `textAlign` | `left` \| `center` \| `right` | Defaults to `center`. |
| `attributes` | `module-attributes` | Shared by every module: `uid` (HTML id for deep links), `hidden`, and `scopedCss`. |

## Image fields

| Field | Type | Description |
| --- | --- | --- |
| `mobile` | image | Optional image for smaller screens. |
| `opacity` | number | From 0 to 1. Defaults to 1. Above 0.5, the copy switches to the background color for contrast. |
| `alt` | string | Alt text for the image. |
| `loading` | `lazy` \| `eager` | Defaults to `lazy`. Use `eager` for heroes above the fold. |

## Demo: Bottom-left aligned

Copy sits at the bottom left with `textAlign: left` and `verticalAlign: bottom`.

[Action CTA](#)

[Action outline CTA](#)

[Ghost CTA](#)

[Link CTA](#)

![](https://cdn.sanity.io/images/cyu7k2r0/production/b25e1c34d2a25480f6887aab6bcde803236cab9e-1200x992.png)

## Demo: Centered with Custom JS

Centered copy over an interactive backdrop drawn by a Custom HTML block with JavaScript.

[Action CTA](#)

[Action outline CTA](#)

[Ghost CTA](#)

[Link CTA](#)

Frequently Asked Questions

## Hero (cover) module FAQ

### When should I use the Hero (cover) module?

Use it at the top of a page when a full-width background image should set the mood, with the headline and call-to-actions laid over it. For a hero with the image beside the copy, use Hero (split) instead.

### How do I add the Hero (cover) module to a page?

In Sanity Studio, open the page, click Add item in its Modules field, and pick Hero (cover). Fill in the fields, check it in the live Presentation preview, and publish. Modules can be reordered by dragging, and the same module can be used on any page as many times as you need.

### How do I customize the Hero (cover) module?

Align the copy with textAlign (left, center, right) and verticalAlign (top, center, bottom), fade the background with opacity (above 0.5 the copy switches color for contrast), add a separate mobile image, and set loading to eager when the hero is above the fold.

Every module also has a Scoped CSS field (plus a uid for deep links and a hidden toggle), so you can restyle one instance without touching the rest of the site. For bigger changes, edit the module's React component and schema in src/modules/hero.cover in the repo.

Previous module

![Card list module](https://cdn.sanity.io/images/cyu7k2r0/production/d95f90bd8d90ee5cdbc2d7a95c05afef5bf1896c-2560x596.png)

[Card list module](/modules/card-list)

Next module

![Hero (split) module](https://cdn.sanity.io/images/cyu7k2r0/production/0f103b02c7a2622df55ff0b4b959a7e76a2cc297-2560x1322.png)

[Hero (split) module](/modules/hero-split)
