UI Library for Design Engineers. Animated components and effects you can copy and paste into your apps. Free. Open Source.
fix: update wavy text styles
Dillion Verma4e6f568520af
diff --git a/content/docs/components/wavy-text.mdx b/content/docs/components/wavy-text.mdxindex fd7f9495..6df64f6c 100644--- a/content/docs/components/wavy-text.mdx+++ b/content/docs/components/wavy-text.mdx@@ -1,7 +1,7 @@----title: Wave Text+title: Wavy Textdate: 2024-05-23-description: An animated text component that waves the text.+description: An animated text component that staggers text upauthor: DoffuXxpublished: true---@@ -24,11 +24,10 @@ components/magicui/wavy-text.tsx## Props-| Prop | Type | Description | Default |-| ----------- | --------------- | -------------------------------------------------- | ------- |-| className | string | The class name to be applied to the component | |-| duration | number | Durations (seconds) for the animation | 0.5 |-| words | string | The word to be animated | |-| variant | object | Custom animation variants for motion component | hidden: { y: 10 },- visible: { y: -10 },- |+| Prop | Type | Description | Default |+| --------- | ------ | -------------------------------------------------- | ------- |+| className | string | The class name to be applied to the component | |+| duration | number | Duration (seconds) for the animation | 0.5 |+| delay | number | Duration (seconds) for stagger between each letter | 0.02 |+| words | string | The word to be animated | |+| variant | object | Custom animation variants for motion component | {} |diff --git a/registry/components/magicui/wavy-text.tsx b/registry/components/magicui/wavy-text.tsxindex 85de2a4b..b9e6052f 100644--- a/registry/components/magicui/wavy-text.tsx+++ b/registry/components/magicui/wavy-text.tsx@@ -12,12 +12,14 @@ interface WavyTextProps {visible: { y: number };};duration?: number;+ delay?: number;}const WavyText = ({word,className,variant,duration = 0.5,+ delay = 0.05,}: WavyTextProps) => {const defaultVariants = {hidden: { y: 10 },@@ -26,7 +28,7 @@ const WavyText = ({const combinedVariants = variant || defaultVariants;const characters = useMemo(() => word.split(""), [word]);return (- <div className="overflow-hidden py-2">+ <div className="overflow-hidden p-2"><div className="flex justify-center space-x-2"><AnimatePresence>{characters.map((char, i) => (@@ -39,11 +41,11 @@ const WavyText = ({transition={{yoyo: Infinity,duration: duration,- delay: i * 0.2,+ delay: i * delay,}}className={cn(className,- "font-display text-center text-4xl font-bold tracking-[-0.02em] drop-shadow-sm md:text-7xl md:leading-[5rem]",+ "font-display text-center text-4xl font-bold tracking-[-0.1em] md:text-7xl",)}>{char}