A light-weight, strong, safe and responsive watermark tool for webpage.
Based on Canvas & Typescript
Light weight: 1.14kb minified size ; Safe: Manual removal of watermarks is not allowed; Responsive: Adaptive screen size; Strong: Almost 100% test coverage
Install using CDN
<script src="https://unpkg.com/browse/aquamark/dist/index.iife.js"></script>
Install using npm
$ npm install aquamark
In Browser
<script src="https://unpkg.com/browse/aquamark/dist/index.iife.js"></script>
<script>
const aquamark = new Aquamark(/** props */)
aquamark.init()
</script>
In webpack
or vite
etc;
import Aquamark from "aquamark"
const aquamark = new Aquamark(/** props */)
aquamark.init()
name | type | description | required | default |
---|---|---|---|---|
content | string |
watermark content | false |
'auqamark.js' |
rotate |
number ( -180~180) |
content rotate | false |
-22 |
font | AuqamarkFont |
font-related | false |
|
top | number |
false |
0 | |
left | number |
false |
0 | |
zIndex | number |
z-index | false |
0 |
name | type | description | required | default |
---|---|---|---|---|
color | string |
font color | false |
rgba(0, 0, 0, .15) |
fontSize | number |
text size | false |
22 |
fontWeight |
'normal' , 'light' , 'weight' , number
|
text weight | false |
'normal' |
fontFamily | string |
text font-famlily | false |
'normal' |
textAlign |
'start' , 'end' , 'left' , 'right' , 'center'
|
text align | false |
'center' |
name | description | parameters |
---|---|---|
init | watermark initial | - |
Aquamark licensed on MIT LICENSE. ©2024-present Yev Wang