Use Material Design Ripple Effects With TailwindCss 4
use ripple effect with tailwindcss 4
``bashinstall with npm
npm install svelte-tailwind-ripple
npm install tailwind-merge
Note
Add class
relative overflow-hidden to parent elementExample
`svelte
type="button"
class="relative overflow-hidden rounded-md bg-blue-500 px-4 py-2 text-white"
>
Button
type="button"
class="relative overflow-hidden rounded-md bg-blue-500 px-4 py-2 text-white"
>
Button
type="button"
class="relative overflow-hidden rounded-md bg-blue-500 px-4 py-2 text-white"
>
Button
``| Prop Name | Type | Default Value |
| ----------- | ------ | ------------- |
| as | string | span |
| duration | number | 500 |
| rippleClass | string | bg-white/25 |
| class | string | |