Ripple effect from Svelte Materialify as a standalone npm package.
npm install svelte-ripple
import Ripple from 'svelte-ripple'
<div use:Ripple>
// div content
</div>
<div use:Ripple={{ centered: false, color: 'red' }}>
// div content
</div>
These are the defaults, all can be passed in as options:
const defaults = {
color: 'currentColor',
class: '',
opacity: 0.1,
centered: false,
spreadingDuration: '.4s',
spreadingDelay: '0s',
spreadingTimingFunction: 'linear',
clearingDuration: '1s',
clearingDelay: '0s',
clearingTimingFunction: 'ease-in-out',
}