All components (283)
Watermark
Utilities · Watermark · .amset-watermark
What it is and when to use it
A text repeated over the content: "Draft", "Confidential". It is a visual notice, not a protection: whoever has the HTML can remove it.
When to use it
- A document that is not valid yet, or should not be forwarded.
rotateis the rotation andgapthe spacing between repetitions.
When not to
- Really protecting a document: that is done when generating it, on the server.
- A notice that must be read:
Alert.
Keyboard: there is nothing to press, and it does not get in the way: what lies beneath can still be pressed and selected.
Accessibility: the drawing is hidden from the reader, and the text is said only once, not once per repetition.
Fine-tuning: --amset-watermark-opacity is how noticeable it is. The colour comes from the theme.
What it looks like
Quote 2026-118
Client: Joyería Aurelia · 12 March 2026
| Item | Amount |
|---|---|
| Flooring and paint | 6.200 € |
| Lighting | 4.350 € |
| Custom counter | 5.800 € |
| Installation and VAT | 2.050 € |
| Total incl. VAT | 18.400 € |
Lead time: six weeks from signing. Offer valid for 30 days.
<Card title="Quote 2026-118" subtitle="Client: Joyería Aurelia · 12 March 2026">
<Watermark text="Draft" gap={96}>
<table>…quote lines and total…</table>
<p>Lead time: six weeks from signing. Offer valid for 30 days.</p>
</Watermark>
</Card>Props
Import it with import { Watermark } from '@amset/ui'. Required props are marked.
| Prop | Type | What it does |
|---|---|---|
childrenrequired | ReactNode | — |
className | string | Merged with the library classes; it does not replace them. |
color | string | Text color. Defaults to the theme one. |
font | WatermarkFont | — |
gap | number | readonly [number, number] | Space between repetitions, in pixels: one number for both directions, or `[horizontal, vertical]`. Defaults to 180. |
image | string | An image that repeats instead of the text. If it does not load, the text shows. `text` or `image` is needed. |
onRemove | () => void | Called if someone removes the watermark from the document; before it is painted again. |
opacity | number | How visible it is, from 0 to 1. Defaults to 0.14. |
rotate | number | Degrees of rotation. By default, -24. |
text | string | readonly string[] | What repeats: «Draft», «Confidential». A list gives one line per text. |
It also accepts the attributes of the element it renders: className, style, data-*, aria-* and its events.
CSS variables
These CSS variables are how you adapt it. Declare them on the component's selector, not on :root: the stylesheet redeclares them in the rule itself, and a declaration on the same element always wins.
| Variable | Default |
|---|---|
--amset-watermark-opacity | 0.14 |
How to change it
.amset-watermark {
--amset-watermark-opacity: ...;
}In the test bench
Every state and variant, to try one at a time, on its page at storybook.amsetui.com:
