does anyone know how to do a button ripple effect with shadcn?
Unanswered
English Lop posted this in #help-forum
![Avatar](https://cdn.discordapp.com/embed/avatars/4.png)
English LopOP
i love nextui's button ripple effect but i have no idea how to do such a thing in shadcn. could any of you point me in the right direction or assist me in some way?
9 Replies
![Avatar](https://cdn.discordapp.com/avatars/1011594178934878248/3dcc464b55267c406f84c2c541ac00df.webp?size=256)
averydelusionalperson
you can just copy any styles, and apply those to shadcn button
![Avatar](https://cdn.discordapp.com/embed/avatars/4.png)
English LopOP
it's not that simple for the ripple effect though
![Avatar](https://cdn.discordapp.com/avatars/1011594178934878248/3dcc464b55267c406f84c2c541ac00df.webp?size=256)
averydelusionalperson
so, like you need javascript?
![Avatar](https://cdn.discordapp.com/embed/avatars/4.png)
English LopOP
i have no idea how the ripple effect is done
but yes it'd need javascript i would believe as the ripple comes from the cursor's position
![Avatar](https://cdn.discordapp.com/avatars/1011594178934878248/3dcc464b55267c406f84c2c541ac00df.webp?size=256)
averydelusionalperson
I'm not sure too how to do it, but I believe you can google it, and add styles or other things here in the components/ui/button
![Image](https://cdn.discordapp.com/attachments/1219489951087857684/1219492269623611462/image.png?ex=660b7fae&is=65f90aae&hm=2111c3f178ab5e3c19367fca4e18a79091709a1864edd679efbe1dfaefad4f3d&)
you can ask doubts here if you get stuck while adding something.
![Avatar](https://cdn.discordapp.com/avatars/1011594178934878248/3dcc464b55267c406f84c2c541ac00df.webp?size=256)
averydelusionalperson
Hi @English Lop, did you manage to add the ripple effect?
![Avatar](https://cdn.discordapp.com/embed/avatars/3.png)
Singapura
Here's what NextUI does to create the ripple effect: https://github.com/nextui-org/nextui/blob/main/packages/components/ripple/src/use-ripple.ts