IUseWatermarkOptions

interface
Composable Options

Options accepted by useWatermark. Mirrors the public props of OrigamWatermark minus the wrapper concerns (tag, class, style).

TypeScript

Definition

The TypeScript interface definition as found in the origam source. Click the copy icon to copy the snippet.

typescript

API

Properties

Every property declared by this interface, with its type, optionality and default.

text
string
Text glyph repeated across the tile. UTF-8 is supported.
image
string
URL / data-URL of an image used as the repeated glyph. Wins over text when both are passed.
opacity
number
0.1
Opacity of the rendered glyph, between 0 and 1.
angle
number
-30
Rotation in degrees applied to each tile. Negative values rotate counter-clockwise.
gap
number
120
Distance (in CSS pixels) between two adjacent tiles along both axes.
fontSize
number
16
Font size (in CSS pixels) of the text glyph. Ignored when image is used.
fontFamily
string
'inherit'
CSS font-family of the text glyph.
color
string
'currentColor'
Colour of the text glyph. Any CSS colour string.
fontWeight
number | string
400
CSS font-weight of the text glyph.
antiTamper
boolean
false
Installs a MutationObserver that re-injects the layer when it is removed. Dissuasive, not a security feature.
pointerEvents
'none' | 'auto'
'none'
Whether the overlay intercepts pointer events.
zIndex
number
1
z-index of the overlay layer.

Ecosystem

Used by

Components and composables that extend or consume this interface.

Usage

Examples

Ready-to-paste code snippets using this interface.

Using useWatermark directly

typescript