# @1ncounter/watermark

> watermark for website on the page.

Latest version **1.0.7** (published 2020-12-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install @1ncounter/watermark
pnpm add @1ncounter/watermark
yarn add @1ncounter/watermark
bun add @1ncounter/watermark
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.7 |
| Published | 2020-12-28 |
| First published | 2019-12-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 42.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6 |
| Author | 1ncounter |
| Maintainers | 1ncounter |
| Keywords | watermark |

## Links

- npm: https://www.npmjs.com/package/@1ncounter/watermark
- Repository: https://github.com/1ncounter/watermark
- Issues: https://github.com/1ncounter/watermark/issues
- npm.io page: https://npm.io/package/@1ncounter/watermark

## Dependencies (1)

- [resize-observer-polyfill](https://npm.io/package/resize-observer-polyfill.md) ^1.5.1

## Recent versions

- 1.0.7 (latest) — 2020-12-28
- 1.0.6 — 2020-12-23
- 1.0.5 — 2020-12-14
- 1.0.4 — 2020-05-08
- 1.0.3 — 2019-12-16
- 1.0.2 — 2019-12-10
- 1.0.1 — 2019-12-10
- 1.0.0 — 2019-12-10

## README

<h1 align="center">watermark</h1>

<h5 align="center">fast, easy, Watermarking for the browser, by shadow dom.</h5>

<br />

```typescript
import Watermark from '@1ncounter/watermark'

const watermark = Watermark.create()
watermark.mount()
```

## Installation

npm

```
npm install @1ncounter/watermark
```

yarn

```
yarn add @1ncounter/watermark
```

## An Quick Sample

```typescript
import { create } from '@1ncounter/watermark'

const Watermark = create({
  // options
  text: 'watermark'
})

Watermark.mount(document.getElementById('app'))
```

## API

```js
Watermark.load()
Watermark.unload()
Watermark.unMount()
```

## Options

| Option     | Description                                                                     | Type           | Default                                                 |
| :--------- | :------------------------------------------------------------------------------ | :------------- | :------------------------------------------------------ |
| text       | watermark content                                                               | string         | watermark                                               |
| img        | watermark can use img instead of text                                           | string         | -                                                       |
| spacing    |                                                                                 | number、object | 0                                                       |
| width      |                                                                                 | number         | 150                                                     |
| height     |                                                                                 | number         | 50                                                      |
| fontSize   |                                                                                 | number         | 24                                                      |
| color      |                                                                                 | string         | #000000                                                 |
| fontFamily |                                                                                 | string         | Helvetica, "PingFang SC", "Microsoft YaHei", "微软雅黑" |
| alpha      |                                                                                 | number         | 0.15                                                    |
| angle      |                                                                                 | number         | 30                                                      |
| force      | Enable forced mode to prevent watermarks from being deleted to a certain extent | boolean        | -                                                       |
| resize     | watermarks can change after container resize                                    | boolean        | -                                                       |
| createMark | create mark method, must return HTMLElement                                     | Function       | -                                                       |

## License

MIT

---
_Source: https://npm.io/package/@1ncounter/watermark · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
