Skip to main content

AnimatedText

Add a changing suffix to a status label without changing the space it occupies.

AnimatedText in a native Kindle example

Usage​

Save this example as apps/Reader/App.js in the starter app.

import React from 'react';
import {AnimatedText, View} from 'react-kindle';

export default function App() {
return (
<View style={{padding: 24}}>
<AnimatedText interval={600}>Loading</AnimatedText>
</View>
);
}

Props​

PropType / defaultDescription
childrentextStatus label.
patternstring = ...Characters revealed one at a time.
intervalpositive number = 300Milliseconds between frames.
animatingboolean = trueFalse shows the complete suffix.
styleText styleText and background colors.

Set style.backgroundColor when using a non-white surface; hidden suffix characters use that color. The screenshot shows one animation frame.