diff --git a/README.md b/README.md index d433afb..5b9801c 100644 --- a/README.md +++ b/README.md @@ -79,7 +79,9 @@ The following props allows you to configure the properties for the type animatio | `cursorStyle` | no | TextStyle | | Additional styles for the cursor. | | `delayBetweenSequence` | no | Number | 100 | Delay between animation sequences (in milliseconds). | | `direction` | no | String | front | Specifies the direction in which to perform the typing/deleting animation. It accepts two possible values: 'front' and 'back'. | +| `initialDelay` | no | Number | 0 | The delay before the animation begins (in milliseconds). | | `loop` | no | Boolean | false | Whether to loop the typing animation indefinitely. | +| `preRenderText` | no | String | None | Specifies the initial text to display. | | `repeat` | no | Number | 1 | The number of times to repeat the sequence. | | `sequence` | yes | Array | | An array of objects defining the text to be typed and animation options. | | `splitter` | no | Function | | A function to split text into individual characters or chunks for typing. | diff --git a/src/TypeAnimation.tsx b/src/TypeAnimation.tsx index 5d15433..42f0ce5 100644 --- a/src/TypeAnimation.tsx +++ b/src/TypeAnimation.tsx @@ -142,9 +142,9 @@ type TypeAnimationProps = { /** * Specifies the initial text to display. */ - preRender?: string; + preRenderText?: string; /** - * The delay before the animation begin (in milliseconds). Default: 0 + * The delay before the animation begins (in milliseconds). Default: 0 */ initialDelay?: number; }; @@ -163,11 +163,11 @@ const TypeAnimation: React.FC = ({ cursorStyle, cursor = true, direction = 'front', - preRender = '', + preRenderText = '', initialDelay = 0, }) => { - const [text, setText] = useState(preRender); - let currentText = preRender; + const [text, setText] = useState(preRenderText); + let currentText = preRenderText; /** * Type a sequence of letters with a specified speed.