Skip to content

Watermark

A full-screen or local watermark component that overlays repeated text watermarks on content for copyright protection, anti-screenshot, branding, and more. Supports custom text, colors, rotation angles, spacing, and full-screen mode.

Platform Differences

App (vue)App (nvue)H5Mini Program

Basic Usage

  • Put content inside the default slot and set watermark text via content.
html
<see-watermark content="SeeYouUI">
  <view class="your-content">Sensitive Area</view>
</see-watermark>

Multi-line Watermark

  • Pass a string array to content for multiple lines.
html
<see-watermark :content="['SeeYouUI', 'Confidential']" :gap="[120, 60]" rotate="-30" />

Full-screen Watermark

  • Set fullScreen to true for a fixed-position full-screen overlay.
html
<see-watermark content="INTERNAL USE ONLY" font-size="36" full-screen />

Custom Styling

  • Control visual appearance with fontColor, fontSize, fontWeight, gap, and rotate.
html
<see-watermark
  content="COPYRIGHT"
  font-size="40"
  font-color="rgba(255, 182, 69, 0.18)"
  :gap="[100, 100]"
  rotate="-15"
/>

Empty Content

  • When content is an empty string, only the child content is rendered without the watermark layer.
html
<see-watermark content="">
  <view>No watermark</view>
</see-watermark>

API

Props

PropDescriptionTypeDefault
contentWatermark text, array for multi-linestring | string[]''
gapSpacing between cells [x, y] (rpx)[number, number][80, 80]
offsetStarting offset [x, y] (rpx)[number, number][0, 0]
rotateRotation angle (deg)number-22
fontSizeFont size (number = rpx, string = as-is)number | string28
fontColorFont colorstring'rgba(0,0,0,0.15)'
fontWeightFont weightstring | number'normal'
fontFamilyFont familystring'inherit'
zIndexWatermark layer z-indexnumber9
fullScreenFull-screen fixed overlaybooleanfalse
widthContainer width (number = rpx)number | string''
heightContainer height (number = rpx)number | string''

Slots

NameDescription
defaultContent to be watermarked

Liao ICP No. 2025070134