New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

image-filter-component

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

image-filter-component

Image Filter Web Component

  • 0.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
12
increased by50%
Maintainers
1
Weekly downloads
 
Created
Source

Built With Stencil

image-filter web component

This is a web component for applying different filters to your image.

Using this component

Add the following script tag in the head of your .html page

<script type="module" src="https://unpkg.com/image-filter-component@0.0.2/dist/image-filter/image-filter.esm.js"></script>

Then in your html or jsx

  <image-filter 
    src="beach-time.jpg" 
    alt="Children at the beach" 
    width="500" 
    filter="sepia"></image-filter>

API

image-filter properties

  • src (string)
  • alt (string)
  • width (string)
  • height (string)
  • class (string) : allows you to apply your own styles
  • filter (string) : supported values shown below

Supported Filter Values

  • sepia
  • invert
  • grayscale
  • blur
  • contrast
  • saturate
  • huerotate
  • shadow
  • opacity

Demo

  • Look at the DEMO and see the different styles applied

Script tag

  • Put a script tag similar to this <script type='module' src='https://unpkg.com/image-filter-component@0.0.2/dist/image-filter/image-filter.esm.js'></script> in the head of your index.html
  • Then you can use the element anywhere in your template, JSX, html etc
  • Remember to add type="module" on your script tag as shown above

Node Modules

  • Run npm install image-filter-component --save
  • Put a script tag similar to this <script type='module' src='node_modules/image-filter-component/dist/image-filter/image-filter.esm.js'></script> in the head of your index.html
  • Then you can use the element anywhere in your template, JSX, html etc
  • Remember to add type="module" on your script tag as shown above

FAQs

Package last updated on 28 Feb 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc