ndelvalle / v-blur Goto Github PK
View Code? Open in Web Editor NEW⬜️ Vue directive to blur an element dynamically
License: MIT License
⬜️ Vue directive to blur an element dynamically
License: MIT License
I'd suggest adding some way to specify duration and easing as "options", maybe you can accept "options" object in v-blur
something like v-blur="{durationg: 0.5, easing: 'ease-in-out', blurred: true}"
?
Using the following syntax, as stated in README, doesn't override defaults:
Vue.use(vBlur, {
opacity: 0.8,
filter: 'blur(6px)',
transition: 'all .3s linear',
})
I can get this to work just fine if I only use isBlurred
but if I used the blurConfig, I can't seem to activate it
<img id="logo" v-blur="blurConfig" />
blurConfig: {
isBlurred: false,
opacity: 0,
filter: 'blur(1.2px)',
transition: 'all .3s linear',
},
Then if I call this.blurConfig.isBlurred = true;
Nothing happens
but if I use
<img id="logo" v-blur="isBlurred" />
then when I do this.isBlurred = true
Then the blur is activated
Also another problem I noticed is, attaching isBlurred to an element automatically applies an opacity to it.. even if isBlurred is currently set to false. This causes conflicts in my application since I want to attach isBlurred on items which are initially hidden by having their opacity set to 0
Is there a way to attach the v-blur directive dynamically to get around this?
Something like this would be very useful:
Vue.use(vBlur, {
isBlurred: true,
opacity: 1,
filter: "blur(5px)",
transition: "all .3s linear"
});
Is there a way to prevent interaction with elements which are under the blur zone ?
I did not make the codeship migration so the CI is not working at the momet
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.