Pop in
Also called pop animation or bounce in
An entrance animation where an element scales up past its full size and settles back, giving it a quick, springy arrival.
import { AnimatePresence, motion, useReducedMotion } from 'motion/react';
// bounce: 0.5 overshoots past full size, then settles.
const POP = { type: 'spring', visualDuration: 0.4, bounce: 0.5 } as const;
export function NotificationBell({ count }: { count: number }) {
const reduceMotion = useReducedMotion();
const hidden = reduceMotion ? { opacity: 0 } : { scale: 0 };
return (
<button
type='button'
aria-label={`Notifications, ${count} unread`}
className='relative grid size-10 place-items-center rounded-full hover:bg-muted'
>
<svg
viewBox='0 0 24 24'
fill='none'
stroke='currentColor'
strokeWidth={2}
className='size-5'
aria-hidden
>
<path d='M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9' />
<path d='M10.3 21a1.94 1.94 0 0 0 3.4 0' />
</svg>
<AnimatePresence>
{count > 0 && (
<motion.span
key='badge'
initial={hidden}
animate={{ opacity: 1, scale: 1 }}
transition={reduceMotion ? { duration: 0.15 } : POP}
// A quick tween on the way out, so the spring can't overshoot below 0.
exit={{ ...hidden, transition: { duration: 0.15 } }}
className='absolute -top-0.5 -right-0.5 grid h-5 min-w-5 place-items-center rounded-full bg-red-500 px-1 text-xs font-semibold text-white'
>
{count}
</motion.span>
)}
</AnimatePresence>
</button>
);
}When the unread count goes from 0 to a number, pop the red badge in on the bell icon: scale it from 0 to 1 with a spring that has a 0.4s visual duration and 0.5 bounce, so it overshoots slightly and settles. Fade it in instead when prefers-reduced-motion is set.
Paste into Layerwise or any AI coding tool.
What is Pop in?
A pop in starts small, overshoots to roughly 110 to 120% of its size, and settles at 100%. The overshoot reads as energy, so it draws the eye and feels playful.
Use it for small things that deserve attention: a notification badge appearing, a heart filling when someone likes a post, a checkmark after a task is done, or a new emoji reaction. Large panels and blocks of text look clumsy when they bounce, so give those a plain scale in.
Build it with a spring (for example, bounce: 0.5) or an overshoot curve such as cubic-bezier(0.34, 1.56, 0.64, 1). Keep it under about 400ms so it feels snappy, and use a simple fade for people who prefer reduced motion.
Often confused with
Related terms
All termsScale in
An entrance animation where an element grows from slightly smaller than its final size to full size while it fades in.
Overshoot easing
An easing curve that runs slightly past its end point and then settles back, giving motion a small, springy kick.
Spring animation
An animation driven by simulated spring physics in place of a fixed duration and curve, so motion can overshoot, settle, and react naturally.
Micro-interaction
A small moment of feedback around a single action, like a heart that bursts when tapped or a copy icon that turns into a checkmark.
Build it with Layerwise
Describe your app, watch it run in a live preview, and publish it with a database, storage, and sign-in built in.