use-geul-pipe is hook for run typing effect with multiple values in order.
function useGeulPipe(values: string[],options: UseGeulPipeOptions,): UseGeulPipeReturn;
values#Values that will be sequential results of the typing effect.
UseGeulPipeOptions#| option | type | description |
|---|---|---|
speed | number | Speed of typing effect (ms) |
decomposeOnBackspace | boolean | undefined | Whether to have the effect of separating consonants when backspace |
UseGeulPipeReturn#| member | type | description |
|---|---|---|
geul | string | Typed value |
isRunning | boolean | Running status of the geul instance |
next | () => void | funtion that start next typing effect |
reset | () => void | funtion that reset typing effect |
"" -> "안녕" -> "안녕하세요"#value: ["안녕", "안녕하세요"]
options:
- speed: 50
- initial: ""
- decomposeOnBackspace:undefined
result:
"" -> "안녕하세요" -> "안녕" (without decomposeOnBackspace)#value: ["안녕하세요", "안녕"]
options:
- speed: 50
- initial: ""
- decomposeOnBackspace:undefined
result:
"" -> "안녕하세요" -> "안녕" (with decomposeOnBackspace)#value: ["안녕하세요", "안녕"]
options:
- speed: 50
- initial: ""
- decomposeOnBackspace:true
result: