GithubHelp home page GithubHelp logo

doc22940 / vue-cosha Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kn0wn/vue-cosha

1.0 2.0 0.0 356 KB

A vue directive for the cosha library

License: MIT License

JavaScript 67.64% Vue 25.09% HTML 7.27%

vue-cosha's Introduction

vue-cosha

latest version on npm npm downloads a month bundlephobia minified size

Vue cosha is a simple port of the cosha library for ease of use in Vue projects.

"Colorful shadows for your images. 🎨"

cosha lets you add colorful shadows to your images. Try it out and look for yourself—the bundle is only less than 1kb small and it couldn't be easier to set up!

How

npm i vue-cosha
import Vue from "vue";
import VueCosha from "vue-cosha";

Vue.use(VueCosha);
<!-- regular old img tag -->
<template>
  <img src="my-dope-pic.jpg" alt="mmmhm" v-cosha />
</template>

Nuxt

npm i vue-cosha

Create a file called vue-chosha.js in your plugins folder with the following inside

import Vue from "vue";
import VueCosha from "vue-cosha";

Vue.use(VueCosha);

Register the plugin in your nuxt.config.js

plugins: [
    '~/plugins/vue-cosha'
],
<!-- regular old img tag -->
<template>
  <img src="my-dope-pic.jpg" alt="mmmhm" v-cosha />
</template>

Config

Everything in the config is optional. The default values are:

import VueCosha from "vue-cosha";

Vue.use(VueCosha, {
  className: "cosha",
  blur: "5px",
  brightness: 1,
  saturation: 1,
  x: 0,
  y: 0,
  index: 0
});

License

MIT

vue-cosha's People

Contributors

kn0wn avatar

Stargazers

Acampbell avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.