@egonr/svelte-erippler
TypeScript icon, indicating that this package has built-in type declarations

0.1.2 • Public • Published

Svelte ERippler

ripple demo

  • Smooth CSS Animations
  • Custom/Multiple Ripples
  • Single file/zero dependencies
  • Demo Page

Install

npm i @egonr/svelte-erippler

Since everything is contained in a single file you could also just copy src/lib/ERippler.svelte to your project.

Usage

<script lang="ts">
    let rippler: ERippler
</script>

<a
    href="#"
    style="position: relative; overflow: hidden;"
    on:pointerdown={(e) => rippler.spawnRipple(e.clientX, e.clientY)}
>
    <ERippler bind:this={rippler}>
        <div
            style="background: darkred; position: absolute; inset: 0; z-index: -1;"
        ></div>
    </ERippler>
    <h1>rippler test</h1>
</a>

For more examples see the demo page source code at src/routes/+page.svelte.

Readme

Keywords

none

Package Sidebar

Install

npm i @egonr/svelte-erippler

Weekly Downloads

0

Version

0.1.2

License

MIT

Unpacked Size

7.93 kB

Total Files

6

Last publish

Collaborators

  • egonr