npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@watermarkify/vue-watermark

v0.0.7

Published

Vue Watermark

Downloads

5,421

Readme

@watermarkify/vue-watermark

NPM version License Total NPM Download

@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.

Features

  • Simple integration: Easily add watermarks to your Vue.js applications with just a few lines of code.
  • Customizable options: Customize the watermark's appearance, position, size, and more to suit your needs.
  • Support for images and text: Add watermark images or text, and control various properties such as font style, color, and size.
  • Responsive design: The watermark adapts to different screen sizes and device orientations.

Installation

You can install @watermarkify/vue-watermark via npm or yarn:

npm install @watermarkify/vue-watermark
# or
yarn add @watermarkify/vue-watermark
# or
pnpm install @watermarkify/vue-watermark

Usage

The following code snippet is retrieved from playground. You may also try the interactive playground here.

<script setup lang="ts">
// step 1: import Watermark from @watermarkify/vue-watermark
import { Watermark } from '@watermarkify/vue-watermark'

// step 2: define watermark options
// see https://github.com/watermarkify/vue-watermark#options
const watermarkOptions = ref({
  content: 'watermark',
  gap: [20, 20],
  offset: [10, 10],
  zIndex: 5,
  rotate: -20,
})
</script>

Pass watermarkOptions to options and define your slot.

<Watermark :options="watermarkOptions">
  <div>This is the content of the slot.</div>
</Watermark>

Options

| 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)" } |

License

@watermarkify/vue-watermark is licensed under the MIT License. See the LICENSE file for more information.

Contributing

Contributions are welcome! To contribute to @watermarkify/vue-watermark, please fork the repository and submit a pull request.