Skip to main content

Emojis

A set of animated emojis.

Emoji Fonts

OpenMoji is used in the examples as a font for the example but you can use any other emoji font. Example NotoColorEmoji or OpenSansEmoji (not as nice but lighter).

The font is not directly integrated into Fiesta because it is a heavy file and not everyone needs it, hence you have to pass it yourself from your application.

Emoji Popper

The emoji popper allows you to pass either a single or multiple emojis and then the emoji popper will distribute the emojis across the screen to give a nice and simple animation.

NameTypeDescription
emojis?string[]Array of emojis (default is ['🎉']).
fontSkFontFont to use for the emojis.
spacing?numberSpace between items horizontally (default is 30).
import { StyleSheet, View } from 'react-native';
import { useFont } from '@shopify/react-native-skia';
import { EmojiPopper } from 'react-native-fiesta';

function App() {
const font = useFont(require('./fonts/OpenMoji-Color.ttf'), 30);

return (
<View style={styles.container}>
<EmojiPopper emojis={['🤠', '🎈', '🎉', '🍻']} font={font} />
</View>
);
}

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

Single emoji

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

NameTypeDescription
x?numberInitial x position of the emoji (default is 0).
y?numberInitial y position of the emoji (default is 0).
autoHide?booleanWhether the emoji should hide (fade out) automatically or not (default is true).
emoji?stringEmoji to display (default is '🎉').
fontSkFontFont to use for the emojis.
import { StyleSheet } from 'react-native';
import { Canvas } from '@shopify/react-native-skia';
import { Emoji } from 'react-native-fiesta';

function App() {
return (
<Canvas style={styles.canvas}>
<Emoji emoji="🎉" x={15} y={50} autoplay={false} font={font} />
</Canvas>
);
}

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