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

Function TrueFocusDemo

src/demo/TextAnimations/TrueFocusDemo.jsx:28–155  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

26};
27
28const TrueFocusDemo = () => {
29 const { props, updateProp, resetProps, hasChanges } = useComponentProps(DEFAULT_PROPS);
30 const { manualMode, blurAmount, animationDuration, pauseBetweenAnimations, borderColor } = props;
31
32 const config = {
33 sentence: 'True Focus',
34 manualMode,
35 blurAmount,
36 borderColor,
37 animationDuration: animationDuration,
38 pauseBetweenAnimations
39 };
40
41 const propData = useMemo(
42 () => [
43 {
44 name: 'sentence',
45 type: 'string',
46 default: "'True Focus'",
47 description: 'The text to display with the focus animation.'
48 },
49 {
50 name: 'separator',
51 type: 'string',
52 default: "' '",
53 description: 'Optional string used to separate words in the sentence.'
54 },
55 {
56 name: 'manualMode',
57 type: 'boolean',
58 default: 'false',
59 description: 'Disables automatic animation when set to true.'
60 },
61 {
62 name: 'blurAmount',
63 type: 'number',
64 default: '5',
65 description: 'The amount of blur applied to non-active words.'
66 },
67 {
68 name: 'borderColor',
69 type: 'string',
70 default: "'green'",
71 description: 'The color of the focus borders.'
72 },
73 {
74 name: 'glowColor',
75 type: 'string',
76 default: "'rgba(0, 255, 0, 0.6)'",
77 description: 'The color of the glowing effect on the borders.'
78 },
79 {
80 name: 'animationDuration',
81 type: 'number',
82 default: '0.5',
83 description: 'The duration of the animation for each word.'
84 },
85 {

Callers

nothing calls this directly

Calls 1

useComponentPropsFunction · 0.85

Tested by

no test coverage detected