question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Feature Request] Add more ripple options

See original GitHub issue

Problem to solve

The ripple can’t be customized

Proposed solution

Add global and local options.

Here is a full example:

Vue.use(Vuetify, {
    ripple: {
        duration: 1000, // the duration of the animation from start to finish
        center: "top right", // start at a fixed position instead of the mouse position
        alwaysFinish: false, // always finish the animation, even when the mouse button is released
        activator: "click", // start when this event occurs (available options: "click", "hover", "dbclick", "mouseout", "none" (disables the ripple effect))
        transitionTiming: "ease-in-out", // any transition-timing-function
        from: {
            fill: .1, // the initial fill percentage (0 = no ripple visible, 1 = ripple fills the element)
            color: "primary", // the animation starts with the primary color
            stay: 100, // the ripple effect stays in the from state for .1 second before transitioning to the to state
            shape: "circle", // a predefined shape (like circle, square, triangle) or a svg path (like "M 200 300 L 150 300 L 100 350 L 250 350 L 200 300"),
            shapeOutline: false, // false or any number; if false, the shape will be filled, otherwise, the shape will only have a x px outline and no fill color        
        },
        to:{
            fill: .8, // the fill percentage at the end of the animation (animation reverses if this number is lower than from.fill)
            color: "accent", // the animation transitions to the accent color
            stay: 2000, // the ripple effect stays on this element for 2 seconds after finishing if you don't release the mouse button
            shape: "square", // morph the circle into a square
            shapeOutline: false, // same as above    
        }
    }
})

The ripple color should also be editable using this.$vuetify.theme.ripple = '#4caf50'.

You should also be able to shorten the ripple options a bit:

{
    duration: 1000,
    center: "top right",
    alwaysFinish: false,
    activator: "click",
    transitionTiming: "cubic-bezier(0.25, 0.1, 0.25, 1)",
    shape: "square",
    shapeOutline: 10, // 10px outline
    fill: .5 // from.fill is set to 0 and to.fill is set to .5
    color: "primary", // from.color and to.color are set to "primary", use "auto" to set the color to gray on a bright background and white on a dim background
    stay: 100, // from.stay and to.stay are set to 100
}
<v-btn :ripple="{duration: 100, ...}" />
<div v-ripple="{center: 'bottom right', ...}" />

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:7
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
nekosaurcommented, Nov 5, 2018

This is quite bit more than what we actually need internally, feature-wise, from ripple. I am not opposed to integrating some of these options. But in my opinion it’s a bit of a “you want it, you do it” feature, when it comes to priority.

0reactions
gijswijscommented, Mar 29, 2019

The following may be slightly off topic, but still: I’m building a tab strip where I’m able to remove tabs by clicking on a close icon inside the tab. The ripple effect throws an error:

Cannot set property 'touched' of undefined

This is to be expected because it tries to set a property of a tab that by then is already removed. The easy fix is to turn of the ripple effect and that works.

But I like the ripple effect. Would it be possible to have a ripple callback of sorts? Or should I just work with a timeout?

Read more comments on GitHub >

github_iconTop Results From Across the Web

feature - XRPL.org
The feature command returns information about amendments this server knows about, including whether they are enabled and whether the server is voting in...
Read more >
[Suggestion] Passing ripple options for android #1140 - GitHub
Seems like there is a prop pressColor for android_ripple.color, however android_ripple.bordeless seems hard-coded. Would it be possible to pass this setting ...
Read more >
Ripple Editing in MIDI Editor - Cockos Incorporated Forums
Ripple Editing in MIDI Editor REAPER Feature Requests.
Read more >
Ripple: Crypto Solutions for Business
Ripple is the leading provider of crypto solutions for businesses. Learn how we're helping organizations of all sizes drive impact with the power...
Read more >
Uphold Adds Buy and Sell Options for Ripple's XRP - CoinDesk
Digital payments startup Uphold announced Wednesday that it has added support for Ripple's XRP cryptocurrency.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found