Gathering detailed insights and metrics for @watermarkify/vue-watermark
Gathering detailed insights and metrics for @watermarkify/vue-watermark
Gathering detailed insights and metrics for @watermarkify/vue-watermark
Gathering detailed insights and metrics for @watermarkify/vue-watermark
npm install @watermarkify/vue-watermark
Typescript
Module System
Node Version
NPM Version
TypeScript (55.43%)
Vue (35.63%)
CSS (5.41%)
JavaScript (2.07%)
HTML (1.45%)
Total Downloads
38,790
Last Day
12
Last Week
144
Last Month
1,076
Last Year
37,673
25 Stars
346 Commits
5 Forks
1 Watching
12 Branches
4 Contributors
Minified
Minified + Gzipped
Latest Version
0.0.7
Package Id
@watermarkify/vue-watermark@0.0.7
Unpacked Size
16.23 kB
Size
5.74 kB
File Count
6
NPM Version
10.2.3
Node Version
20.10.0
Publised On
08 Apr 2024
Cumulative downloads
Total Downloads
Last day
-65.7%
12
Compared to previous day
Last week
-16.3%
144
Compared to previous week
Last month
-77.4%
1,076
Compared to previous month
Last year
3,272.7%
37,673
Compared to previous year
1
@watermarkify/vue-watermark
is a lightweight and customizable Vue.js component that allows you to easily add watermarks to your web applications. With Vue Watermark, you can overlay images or text on top of images, videos, or any other HTML elements to protect your content or add branding.
You can install @watermarkify/vue-watermark
via npm or yarn:
1npm install @watermarkify/vue-watermark 2# or 3yarn add @watermarkify/vue-watermark 4# or 5pnpm install @watermarkify/vue-watermark
The following code snippet is retrieved from playground. You may also try the interactive playground here.
1<script setup lang="ts"> 2// step 1: import Watermark from @watermarkify/vue-watermark 3import { Watermark } from '@watermarkify/vue-watermark' 4 5// step 2: define watermark options 6// see https://github.com/watermarkify/vue-watermark#options 7const watermarkOptions = ref({ 8 content: 'watermark', 9 gap: [20, 20], 10 offset: [10, 10], 11 zIndex: 5, 12 rotate: -20, 13}) 14</script>
Pass watermarkOptions
to options
and define your slot.
1<Watermark :options="watermarkOptions"> 2 <div>This is the content of the slot.</div> 3</Watermark>
Property | Description | Type | Default Value |
---|---|---|---|
width | The width of the watermark in pixels. If not specified, defaults to the width of the container element. | number | 120 |
height | The height of the watermark in pixels. If not specified, defaults to the height of the container element. | number | 64 |
content | The text content to be used as the watermark. Can be a string or an array of strings. If image is provided, this property will be ignored. | string or string[] | undefined |
gap | The gap between each instance of the watermark in pixels. Can be an array with two values for horizontal and vertical gap, respectively. | [number, number] | [20, 20] |
offset | The offset of the watermark from the top-left corner of the container element in pixels. Can be an array with two values for horizontal and vertical offset, respectively. | [number, number] | [gap[0]/2, gap[1]/2] |
zIndex | The z-index of the watermark relative to other elements on the page. | number | 5 |
rotate | The rotation angle in degrees of the watermark. Can be a value in the range [-180, 180]. | number | -20 |
font | The font properties for the watermark text, including family, size, style, weight, and color. | WatermarkFont | { family: "sans-serif", size: 18, style: "normal", weight: "normal", color: "rgba(0,0,0,.2)" } |
@watermarkify/vue-watermark
is licensed under the MIT License. See the LICENSE file for more information.
Contributions are welcome! To contribute to @watermarkify/vue-watermark
, please fork the repository and submit a pull request.
No vulnerabilities found.
No security vulnerabilities found.