---
title: "Watermark"
description: "A faint mark over a document, photo, or screen: a word, the viewer's email and date, or a logo, tiled, centered, or in a corner."
url: https://gelatinui.com/components/watermark
markdown_url: https://gelatinui.com/components/watermark.md
access: free
install: "npx shadcn@latest add @gelatin-ui/watermark"
registry_item: https://gelatinui.com/r/watermark.json
version: "2026-11-17"
index: https://gelatinui.com/llms.txt
docs_index: https://gelatinui.com/docs/llms.txt
---

# Watermark

> A faint mark over a document, photo, or screen: a word, the viewer's email and date, or a logo, tiled, centered, or in a corner.

Page: https://gelatinui.com/components/watermark

## When to use it

Best for: A faint, repeated mark over private content, so screenshots and prints show who saw it and when.

- Wrap the content in `Watermark`: the mark draws over its children, and clicks and text selection pass through.
- Pass the viewer's email and the date as two lines (`text={[email, date]}`), so a copy shows its source.
- Use `layout="center"` with a large `fontSize` for one status word, and `layout="corner"` with `image` for a logo.
- Use `ink="light"` over a photo, and `ink="auto"` over content that has light and dark parts.

## When not to use it

- For text that stays hidden until the person shows it, use a [Spoiler](https://gelatinui.com/components/spoiler.md).
- For text that must be blacked out, use a [Text Redact Reveal](https://gelatinui.com/components/text-redact-reveal.md).

## Notes for agents

- The mark is a deterrent, not protection. Keep private data on the server and send only what the viewer may see.
- `guard` (default true) puts the mark back when a script or the dev tools remove, hide, or restyle it.
- The content stays hidden until the mark draws, so it never shows without its mark.
- A logo URL from another origin needs CORS. If the logo does not load, only the text draws.
- Print keeps the mark at an opacity of 0.24 or more, so toner shows it.
- `ink="current"` takes the text color of the root: put `text-destructive` on the root for a red DRAFT.

## Anatomy

```text
Watermark
```

## API reference

### Watermark

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `text` | `string \| readonly string[]` | "Confidential" | The mark text, one string per line: a word, or the viewer's email and the date. |
| `image` | `string` |  | A logo URL drawn above the text. A cross-origin logo needs CORS, or only the text draws. |
| `layout` | `WatermarkLayout` | "tiled" | `tiled` (a staggered grid, default), `center` (one large mark), or `corner` (one mark at the end-bottom corner). |
| `angle` | `number` | -24 | The turn of the mark in degrees. Default −24. |
| `gap` | `number` | 64 | The space around each mark in a tile, in px. Default 64. |
| `opacity` | `number` | 0.12 | The ink opacity, 0 to 1. Default 0.12. Print takes at least 0.24, so toner shows it. |
| `fontSize` | `number` | 14 | The text size in px. Default 14; `center` reads well at 48 and up. |
| `ink` | `"auto" \| "current" \| "foreground" \| "light"` | "foreground" | `foreground` (the theme ink, default), `light` (white), or `auto` (white with a difference blend: it shows over light and dark pixels), or `current` (the root text color). |
| `guard` | `boolean` | true | Puts the mark back when a script or the dev tools remove, hide, or restyle it. Default true. |

## Styling

| Part | Slot | States | CSS variables | Tokens |
| --- | --- | --- | --- | --- |
| Watermark | `watermark` | `data-pending` | `--watermark-opacity`, `--watermark-size`, `--watermark-tile` |  |

## Usage

Wrap the content and pass the viewer's email and the date as two lines.

```tsx title="shared-agreement.tsx"
import { Watermark } from "@/components/privacy/watermark";

export function SharedAgreement() {
  return (
    <Watermark
      text={["maya@northwind.studio", "10 Nov 2026 14:02"]}
      className="w-xl max-w-full rounded-xl border"
    >
      <article className="flex flex-col gap-3 bg-card p-8 text-sm">
        <h2 className="text-lg font-semibold">Design services agreement</h2>
        <p>
          This agreement is made on 2 November 2026 between Northwind Studio and
          Gelatin UI.
        </p>
        <h3 className="font-semibold">1. Scope of work</h3>
        <p>
          The studio designs the checkout flow and hands over source files and a
          written spec.
        </p>
        <h3 className="font-semibold">2. Fees and payment</h3>
        <p>The fee is €5,510, paid within 14 days of each invoice.</p>
      </article>
    </Watermark>
  );
}
```

## Compose

Rules:

- Compose the parts (`compose-parts`): Build each item from its named parts as children, and pass your text and icons in as parts.
- Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry.

## Add it

```bash
npx shadcn@latest add @gelatin-ui/watermark
```

It adds 4 registry items: 4 files, 668 lines, and the npm packages `@mantine/hooks`, `clsx`, `tailwind-merge`, `tailwind-variants`.

## For AI agents

- Every item, one file: https://gelatinui.com/llms.txt
- MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp

## Related

- [Image](https://gelatinui.com/components/image.md)
- [Lightbox](https://gelatinui.com/components/lightbox.md)
- [Spoiler](https://gelatinui.com/components/spoiler.md)
- [Text Redact Reveal](https://gelatinui.com/components/text-redact-reveal.md)

## Motion

| Part | Motion |
| --- | --- |
| Draw | none · the mark shows with the content in the first frame, with no fade |
