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

tailwind-mask-image

v1.0.1

Published

A Tailwind CSS plugin that generates dynamic mask-image utilities based on backgroundImage.

Downloads

135

Readme

Tailwind Mask Image body { font-family: Arial, sans-serif; line-height: 1.6; padding: 20px; } h1, h2, h3 { color: #333; } code { background: #f4f4f4; padding: 2px 4px; border-radius: 4px; } pre { background: #f4f4f4; padding: 10px; border-radius: 4px; overflow-x: auto; }

Tailwind Mask Image

A Tailwind CSS plugin that generates dynamic mask-image utilities based on backgroundImage. This plugin allows you to easily create and manage mask images within your Tailwind CSS projects.

Table of Contents

Installation

To install the plugin, run the following command in your project directory:

npm install tailwind-mask-image --save-dev

After installing, you need to include the plugin in your tailwind.config.js file:

// tailwind.config.js
module.exports = {
  theme: {
    // Your theme configuration
  },
  plugins: [
    require('tailwind-mask-image'),
  ],
}

Usage

Once installed and configured, you can use the dynamic utilities in your CSS files or HTML classes. Here are some examples:

<div class="mask-[url('/path/to/image.png')]">
  Your content here
</div>

<div class="mask-linear">
  Your content here with a linear mask
</div>

<div class="mask-shape-circle">
  Your content here with a circular mask
</div>

Available Utilities

Mask Utilities

  • mask-{image}: Set the mask image dynamically based on the configured backgroundImage.
  • mask-linear: Apply a linear gradient mask.
  • mask-shape-circle: Set the mask shape to a circle.
  • mask-shape-ellipse: Set the mask shape to an ellipse.
  • mask-reach-{value}: Define the mask reach (e.g., closest-side, farthest-corner).
  • mask-at-{position}: Position the mask (e.g., center, top, bottom).

Additional Utilities

  • Mask Repeat: Control the repeat behavior of the mask with utilities like mask-repeat, mask-repeat-x, mask-repeat-y, etc.
  • Mask Size: Define the size of the mask using mask-size utilities.
  • Mask Position: Control the position of the mask with mask-position.

Configuration

You can customize the plugin’s behavior by modifying the values in your tailwind.config.js file.

Example configuration:

module.exports = {
  theme: {
    extend: {
      backgroundImage: theme => ({
        'custom-pattern': "url('/path/to/your/image.png')",
      }),
    },
  },
}

License

This project is licensed under the MIT License. See the LICENSE file for more information.

Contributing

Contributions are welcome! If you have suggestions for improvements or find bugs, feel free to open an issue or submit a pull request.