IWatermarkProps

interface
Component Props

Props for OrigamWatermark — a repeating diagonal overlay used to mark a sub-tree as CONFIDENTIAL / DRAFT / personalised by recipient. The component renders an absolutely-positioned layer over its #default slot using a SVG data-URL as background-image.

TypeScript

Définition

La définition TypeScript de l'interface telle que trouvée dans le code source d'origam. Cliquez sur l'icône de copie pour copier l'extrait.

typescript

Héritage

Hérite de

Interfaces parentes dont celle-ci hérite. Leurs propriétés sont disponibles pour tout consommateur de cette interface.

API

Propriétés

Chaque propriété déclarée par cette interface, avec son type, son caractère optionnel et sa valeur par défaut.

text
string
Text glyph repeated across the tile. Required unless image is passed. 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. Applied at the SVG level so the wrapped content stays at full opacity.
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. Note: 'inherit' resolves to the SVG element's own default since the SVG is loaded as a data-URL.
color
string
'currentColor'
Colour of the text glyph. Note: 'currentColor' does NOT work here because the SVG is loaded as a data-URL and detached from the document cascade.
fontWeight
number | string
400
CSS font-weight of the text glyph. Accepts standard CSS values (100-900, normal, bold).
zIndex
number
1
z-index of the overlay layer.
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.

Écosystème

Utilisé par

Composants et composables qui étendent ou consomment cette interface.

Usage

Exemples

Extraits de code prêts à coller utilisant cette interface.

Wrapping confidential content with OrigamWatermark

html