Ripple

A material like ripple-effect in a svelte-action. The ripple uses the text color of the element unless specified in the options.

Example

svelte
<script>
 import { ripple } from '@eirikk/sveltekit-stuff';
</script>

<button use:ripple />

Options

typescript
type RippleOptions = {
	color: string;
	class: string;
	opacity: number;
	centered: boolean;
	spreadingDuration: number;
	spreadingDelay: number;
	spreadingTimingFunction: string;
	clearingDuration: number;
	clearingDelay: number;
	clearingTimingFunction: string;
};

Demo

click to test ripple effect!
NPM version