aquamark
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published


Aquamark.js

A light-weight, strong, safe and responsive watermark tool for webpage.
Based on Canvas & Typescript

GitHub License GitHub Actions Workflow Status

npm package minimized gzipped size NPM Unpacked Size

Light weight: 1.14kb minified size ; Safe: Manual removal of watermarks is not allowed; Responsive: Adaptive screen size; Strong: Almost 100% test coverage

Installation

Install using CDN

<script src="https://unpkg.com/browse/aquamark/dist/index.iife.js"></script>

Install using npm

$ npm install aquamark

Basic Usage

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()

Props

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

AquamarkFont

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'

Methods

name description parameters
init watermark initial -

License

Aquamark licensed on MIT LICENSE. ©2024-present Yev Wang

Package Sidebar

Install

npm i aquamark

Weekly Downloads

1

Version

1.0.2

License

MIT

Unpacked Size

24.9 kB

Total Files

7

Last publish

Collaborators

  • 06k4studio