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

Function DecryptedTextDemo

src/demo/TextAnimations/DecryptedTextDemo.jsx:30–239  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

28};
29
30const DecryptedTextDemo = () => {
31 const { props, updateProp, resetProps, hasChanges } = useComponentProps(DEFAULT_PROPS);
32 const { speed, maxIterations, sequential, useOriginalCharsOnly, revealDirection, animateOn, clickMode } = props;
33
34 const [key, forceRerender] = useForceRerender();
35
36 const propData = useMemo(
37 () => [
38 {
39 name: 'text',
40 type: 'string',
41 default: '""',
42 description: 'The text content to decrypt.'
43 },
44 {
45 name: 'speed',
46 type: 'number',
47 default: '50',
48 description: 'Time in ms between each iteration.'
49 },
50 {
51 name: 'maxIterations',
52 type: 'number',
53 default: '10',
54 description: 'Max # of random iterations (non-sequential mode).'
55 },
56 {
57 name: 'sequential',
58 type: 'boolean',
59 default: 'false',
60 description: 'Whether to reveal one character at a time in sequence.'
61 },
62 {
63 name: 'revealDirection',
64 type: `"start" | "end" | "center"`,
65 default: `"start"`,
66 description: 'From which position characters begin to reveal in sequential mode.'
67 },
68 {
69 name: 'useOriginalCharsOnly',
70 type: 'boolean',
71 default: 'false',
72 description: 'Restrict scrambling to only the characters already in the text.'
73 },
74 {
75 name: 'className',
76 type: 'string',
77 default: '""',
78 description: 'CSS class for revealed characters.'
79 },
80 {
81 name: 'parentClassName',
82 type: 'string',
83 default: '""',
84 description: 'CSS class for the main characters container.'
85 },
86 {
87 name: 'encryptedClassName',

Callers

nothing calls this directly

Calls 2

useComponentPropsFunction · 0.85
useForceRerenderFunction · 0.85

Tested by

no test coverage detected