Skip to content

UI Library for Design Engineers. Animated components and effects you can copy and paste into your apps. Free. Open Source.

removing hsl() from the ripple (#678)

Arghya Das9420a56a41c9
diff --git a/registry/magicui/ripple.tsx b/registry/magicui/ripple.tsx
index 63d57aea..10345cc0 100644
--- a/registry/magicui/ripple.tsx
+++ b/registry/magicui/ripple.tsx
@@ -19,7 +19,7 @@ export const Ripple = React.memo(function Ripple({
<div
className={cn(
"pointer-events-none absolute inset-0 select-none [mask-image:linear-gradient(to_bottom,white,transparent)]",
- className,
+ className
)}
{...props}
>
@@ -27,8 +27,7 @@ export const Ripple = React.memo(function Ripple({
const size = mainCircleSize + i * 70;
const opacity = mainCircleOpacity - i * 0.03;
const animationDelay = `${i * 0.06}s`;
- const borderStyle = i === numCircles - 1 ? "dashed" : "solid";
- const borderOpacity = 5 + i * 5;
+ const borderStyle = "solid";
return (
<div
@@ -43,7 +42,7 @@ export const Ripple = React.memo(function Ripple({
animationDelay,
borderStyle,
borderWidth: "1px",
- borderColor: `hsl(var(--foreground), ${borderOpacity / 100})`,
+ borderColor: `var(--foreground)`,
top: "50%",
left: "50%",
transform: "translate(-50%, -50%) scale(1)",