🎈 New Component: streamlit-emoji-float - animated floating emojis for your apps

Hi Streamlit friends! :balloon:

I built a fun custom component called streamlit-emoji-float that animates emojis by floating them in the app. I was inspired by st.balloons() and st.snow(), which are very cool, and thought it would be even more fun if we could do the same with our favorite emojis. This component makes that possible and helps us add more personality and creativity to any app we build.

Try the live demo on Streamlit Cloud

demo gif

Installation

pip install streamlit-emoji-float

The usage is very simple: just pass a list of emojis and customize parameters such as how many emojis to display, the size range in pixels, and the animation duration. The parameters of the emoji_float() function are listed below.

Usage

from streamlit_emoji_float import emoji_float

# Usage with default emojis
emoji_float()

# Usage with custom parameters
emoji_float(
    emojis=["🔥", "🚀", "🎉"],
    count=20,
    minSize=50,
    maxSize=100,
    animationLength=5
)

emojis: List of emoji characters to animate (default: [“:star:”, “:blush:”, “:balloon:”])
count: Number of emojis to spawn (default: 50)
minSize: Minimum size in pixels (default: 50)
maxSize: Maximum size in pixels (default: 100)
animationLength: Duration of floating animation (default: 3)
key: Streamlit component key for uniqueness

Check out the github repository and :star: it if you find it fun or helpful!
j-ncel/streamlit-emoji-float

1 Like