Skip to main content

Stars

A set of animated stars.

Set of stars​

NameTypeDescription
theme?string[]An array of colors used to add theming to the animation. Fiesta theme is used by default.
spacing?numberSpace between items horizontally (default is 30).
import { StyleSheet, View } from 'react-native';
import { Stars } from 'react-native-fiesta';

function App() {
return (
<View style={styles.container}>
<Stars />
</View>
);
}

const styles = StyleSheet.create({
container: {
flex: 1,
},
});

Single star​

You can also use a single star. Notice that you need to wrap the star with a Canvas, not doing this will crash the application since we need to run the animation inside a Canvas.

NameTypeDescription
xnumberInitial x position of the star.
ynumberInitial y position of the star.
autoplay?booleanWhether the star should animate automatically or not (default is true).
color?booleanStar color (default is rgba(255, 255, 0, 1)).
import { StyleSheet } from 'react-native';
import { Canvas } from '@shopify/react-native-skia';
import { Star } from 'react-native-fiesta';

function App() {
return (
<Canvas style={styles.canvas}>
<Star />
</Canvas>
);
}

const styles = StyleSheet.create({
canvas: {
flex: 1,
},
});