IUseWatermarkOptions
interface
Composable Options
Options accepted by useWatermark. Mirrors the public props of OrigamWatermark minus the wrapper concerns (tag, class, style).
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.
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.
- textstring
- Text glyph repeated across the tile. UTF-8 is supported.
- imagestring
- URL / data-URL of an image used as the repeated glyph. Wins over text when both are passed.
- opacitynumber0.1
- Opacity of the rendered glyph, between 0 and 1.
- anglenumber-30
- Rotation in degrees applied to each tile. Negative values rotate counter-clockwise.
- gapnumber120
- Distance (in CSS pixels) between two adjacent tiles along both axes.
- fontSizenumber16
- Font size (in CSS pixels) of the text glyph. Ignored when image is used.
- fontFamilystring'inherit'
- CSS font-family of the text glyph.
- colorstring'currentColor'
- Colour of the text glyph. Any CSS colour string.
- fontWeightnumber | string400
- CSS font-weight of the text glyph.
- antiTamperbooleanfalse
- 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.
- zIndexnumber1
- z-index of the overlay layer.
Écosystème
Utilisé par
Composants et composables qui étendent ou consomment cette interface.
Usage
Exemples
Extraits de code prêts à coller utilisant cette interface.
Using useWatermark directly