Emoji Spree Chips Free React component
Interest chips for onboarding screens: pick one and its emoji bursts out and floats away in a little spree of particles. Drag the row to scroll.
Original component by Watermelon UI ยท MIT licence
Get the code
npx shadcn@latest add https://registry.watermelon.sh/r/emoji-spree-choice-chips.jsonInstalls from the Watermelon UI registry through the shadcn CLI. Needs Tailwind CSS and the motion package, which the command adds for you.
import { EmojiSpreeChips, type InterestItem } from '../emoji-spree-choice-chips';
const INTERESTS: InterestItem[] = [
{ id: '1', label: 'Design', emoji: '๐จ' },
{ id: '2', label: 'Music', emoji: '๐ต' },
{ id: '3', label: 'Gaming', emoji: '๐ฎ' },
{ id: '4', label: 'Cooking', emoji: '๐ณ' },
{ id: '5', label: 'Travel', emoji: 'โ๏ธ' },
{ id: '6', label: 'Crypto', emoji: '๐ช' },
{ id: '7', label: 'Photography', emoji: '๐ธ' },
{ id: '8', label: 'Coding', emoji: '๐ป' },
{ id: '9', label: 'Fitness', emoji: '๐๏ธ' },
{ id: '10', label: 'Art', emoji: '๐ผ๏ธ' },
{ id: '11', label: 'Movies', emoji: '๐ฌ' },
{ id: '12', label: 'Reading', emoji: '๐' },
{ id: '13', label: 'Nature', emoji: '๐ฟ' },
{ id: '14', label: 'Coffee', emoji: 'โ' },
{ id: '15', label: 'Sports', emoji: '๐' },
{ id: '16', label: 'Fashion', emoji: '๐' },
{ id: '17', label: 'Writing', emoji: 'โ๏ธ' },
{ id: '18', label: 'Tech', emoji: '๐ค' },
{ id: '19', label: 'Science', emoji: '๐ฌ' },
{ id: '20', label: 'Food', emoji: '๐' },
];
export default function EmojiSpreeChipsDemo() {
const handleChange = (selectedIds: string[]) => {
console.log('Selected interests:', selectedIds);
};
return (
<div className="flex items-center justify-center relative overflow-hidden ">
<EmojiSpreeChips
interests={INTERESTS}
onChange={handleChange}
/>
</div>
);
}
// emoji-spree-choice-chips, from Watermelon UI: https://ui.watermelon.sh/animated-components/emoji-spree-choice-chips
// MIT License. Copyright (c) 2025-present Watermelon Contributors.
'use client';
import React, { useState } from 'react';
import { motion, AnimatePresence } from 'motion/react';
export interface InterestItem {
id: string;
label: string;
emoji: string;
}
interface Particle {
id: string;
emoji: string;
xOffset: number;
rotate: number;
}
interface Props {
interests: InterestItem[];
onChange?: (selectedIds: string[]) => void;
}
export const EmojiSpreeChips: React.FC<Props> = ({ interests, onChange }) => {
const [selected, setSelected] = useState<string[]>([]);
const [particles, setParticles] = useState<Particle[]>([]);
const [isPanning, setIsPanning] = useState(false);
const containerRef = React.useRef<HTMLDivElement>(null);
const spawnParticles = (emoji: string) => {
const newParticles: Particle[] = Array.from({ length: 3 }).map(() => ({
id: crypto.randomUUID(),
emoji,
xOffset: (Math.random() - 0.5) * 180,
rotate: (Math.random() - 0.5) * 40,
}));
setParticles(newParticles);
setTimeout(() => {
setParticles([]);
}, 1600);
};
const toggleInterest = (id: string, emoji: string) => {
setSelected((prev) => {
const exists = prev.includes(id);
const updated = exists ? prev.filter((i) => i !== id) : [...prev, id];
onChange?.(updated);
if (!exists) spawnParticles(emoji);
return updated;
});
};
const rows = React.useMemo(() => {
const result: InterestItem[][] = [[], [], []];
interests.forEach((item, index) => {
result[index % 3].push(item);
});
return result;
}, [interests]);
return (
<div className="relative isolate flex min-h-[500px] w-full max-w-4xl flex-col items-center overflow-hidden py-10 sm:min-h-[600px]">
<h2 className="mb-6 w-full self-start px-6 text-2xl font-bold sm:mb-8 sm:text-3xl">
Interests
</h2>
{/* Chips */}
<motion.div
ref={containerRef}
className={`relative z-20 w-full cursor-grab overflow-hidden mask-r-from-90% mask-l-from-90% px-6 active:cursor-grabbing ${
isPanning ? 'touch-none' : 'touch-pan-y'
}`}
>
<motion.div
drag="x"
dragConstraints={containerRef}
onPanStart={() => setIsPanning(true)}
onPanEnd={() => setIsPanning(false)}
className="flex w-max flex-col gap-4 pr-12 sm:gap-5"
>
{rows.map((row, rowIndex) => (
<div key={rowIndex} className="flex w-max gap-4 sm:gap-5">
{row.map((item) => {
const isSelected = selected.includes(item.id);
return (
<motion.button
key={item.id}
whileTap={{ scale: 0.95 }}
transition={{ type: 'spring', stiffness: 260, damping: 18 }}
onClick={() => toggleInterest(item.id, item.emoji)}
className={`flex w-max items-center gap-2 rounded-full border px-4 py-1.5 text-base font-semibold whitespace-nowrap sm:gap-3 sm:px-5 sm:py-2 sm:text-lg ${
isSelected
? 'border-neutral-300 bg-white dark:border-neutral-600 dark:bg-neutral-800'
: 'border-neutral-200 bg-neutral-100 dark:border-neutral-800 dark:bg-neutral-900'
}`}
>
<span>{item.emoji}</span>
<span>{item.label}</span>
</motion.button>
);
})}
</div>
))}
</motion.div>
</motion.div>
{/* PARTICLES */}
<div className="pointer-events-none absolute inset-0">
<AnimatePresence>
{particles.map((p, index) => (
<FloatingEmoji
key={p.id}
emoji={p.emoji}
delay={index * 0.08}
xOffset={p.xOffset}
rotate={p.rotate}
/>
))}
</AnimatePresence>
</div>
{/* Selected Pill */}
<div className="absolute bottom-8 left-1/2 z-20 -translate-x-1/2 sm:bottom-12">
<AnimatePresence>
{selected.length > 0 && (
<motion.div
initial={{ opacity: 0, y: 50, scale: 0.9 }}
animate={{ opacity: 1, y: 0, scale: 1 }}
exit={{ opacity: 0, y: 40 }}
transition={{
type: 'spring',
stiffness: 200,
damping: 20,
}}
className="relative rounded-full border bg-white px-6 py-2.5 text-lg font-bold shadow-lg sm:px-10 sm:py-4 sm:text-xl dark:bg-neutral-900"
>
{selected.length} Interests
</motion.div>
)}
</AnimatePresence>
</div>
</div>
);
};
/* Floating Emoji Component */
const FloatingEmoji = ({
emoji,
delay,
xOffset,
rotate,
}: {
emoji: string;
delay: number;
xOffset: number;
rotate: number;
}) => {
const [phase, setPhase] = useState<'up' | 'down'>('up');
const isMobile = React.useSyncExternalStore(
(callback) => {
window.addEventListener('resize', callback);
return () => window.removeEventListener('resize', callback);
},
() => window.innerWidth < 640,
() => false
);
return (
<motion.div
initial={{ y: 0, x: 0, opacity: 0, scale: 0.6, rotate: 0 }}
animate={{
y: [0, isMobile ? -180 : -260, isMobile ? -180 : -260, 30],
x: [
0,
xOffset * (isMobile ? 0.6 : 1),
xOffset * (isMobile ? 0.5 : 0.8),
],
opacity: [0, 1, 1, 0],
scale: [0.6, isMobile ? 2 : 3, isMobile ? 2 : 3, 0.6],
rotate: [0, rotate, rotate * 0.5],
}}
transition={{
duration: 1,
ease: 'easeInOut',
delay,
}}
onUpdate={(latest) => {
if (typeof latest.y === 'number') {
const threshold = isMobile ? -90 : -130;
if (latest.y < threshold) {
setPhase('up');
} else {
setPhase('down');
}
}
}}
className={`absolute bottom-20 left-1/2 -translate-x-1/2 text-4xl sm:text-6xl ${
phase === 'up' ? 'z-30' : 'z-10'
}`}
>
{emoji}
</motion.div>
);
};
Paste this into Claude, ChatGPT, Cursor, Lovable or v0 to build it from scratch.
Build a React component called "Emoji Spree Chips" with Tailwind CSS and Motion (motion/react). Interest chips for onboarding screens: pick one and its emoji bursts out and floats away in a little spree of particles. Drag the row to scroll. Use spring transitions, keep it accessible with keyboard focus and aria labels, respect prefers-reduced-motion, and make it work on touch screens. Export it as a single .tsx file with sensible default props so it renders a complete demo on its own.How the emoji spree chips works
Interest chips for onboarding screens: pick one and its emoji bursts out and floats away in a little spree of particles. Drag the row to scroll. The component is a single TypeScript file built with React, Tailwind CSS and Motion, so the animation runs on springs and shared layouts instead of hand-written keyframes.
It comes from Watermelon UI, an open-source component library released under the MIT licence. Install it with the shadcn command above, or copy the source from the code tab into your project.
Frequently asked questions
Want motion like this on your website?
We design and build custom websites with motion, 3D and SEO built in. Websites from $500.