MCPcopy
hub / github.com/DavidHDev/react-bits / BlurTextDemo

Function BlurTextDemo

src/demo/TextAnimations/BlurTextDemo.jsx:29–156  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

27};
28
29const BlurTextDemo = () => {
30 const { props, updateProp, resetProps, hasChanges } = useComponentProps(DEFAULT_PROPS);
31 const { animateBy, direction, delay } = props;
32
33 const [key, forceRerender] = useForceRerender();
34
35 const propData = useMemo(
36 () => [
37 {
38 name: 'text',
39 type: 'string',
40 default: '""',
41 description: 'The text content to animate.'
42 },
43 {
44 name: 'animateBy',
45 type: 'string',
46 default: '"words"',
47 description: "Determines whether to animate by 'words' or 'letters'."
48 },
49 {
50 name: 'direction',
51 type: 'string',
52 default: '"top"',
53 description: "Direction from which the words/letters appear ('top' or 'bottom')."
54 },
55 {
56 name: 'delay',
57 type: 'number',
58 default: '200',
59 description: 'Delay between animations for each word/letter (in ms).'
60 },
61 {
62 name: 'stepDuration',
63 type: 'number',
64 default: '0.35',
65 description: 'The time taken for each letter/word to animate (in seconds).'
66 },
67 {
68 name: 'threshold',
69 type: 'number',
70 default: '0.1',
71 description: 'Intersection threshold for triggering the animation.'
72 },
73 {
74 name: 'rootMargin',
75 type: 'string',
76 default: '"0px"',
77 description: 'Root margin for the intersection observer.'
78 },
79 {
80 name: 'onAnimationComplete',
81 type: 'function',
82 default: 'undefined',
83 description: 'Callback function triggered when all animations complete.'
84 }
85 ],
86 []

Callers

nothing calls this directly

Calls 2

useComponentPropsFunction · 0.85
useForceRerenderFunction · 0.85

Tested by

no test coverage detected