Sign up and get 15% off the four courses and Lifetime.
Number reels
Numbers and words spin into their new value like slot-machine reels, with a little motion blur. Good for stats: projects, clients, years.
Members·React and Tailwind
Try it
Projects shipped
0How to use this
- 01
Make a file called number-animation.tsx in your project's components folder.
- 02
Install what it needs: npm install framer-motion
- 03
Paste the code in, keeping the licence note at the top.
- 04
Import it where you want it and change the words, colours and sizes to yours.
The code
"use client";
import { useLayoutEffect, useRef, useState, useSyncExternalStore } from "react";
import type { CSSProperties } from "react";
import { AnimatePresence, animate, motion, useMotionValue, usePresence, useReducedMotion, useTransform, useVelocity } from "framer-motion";
/**
* Text and numbers that spin into their new value like slot machine reels. Every character is a reel; digits count through
* the wheel in the direction the number moved, letters shuffle through the alphabet, and reels stop one after another from
* left to right with a soft, overshoot-free landing. Use it for prices, stats, and launch moments where a change deserves a beat.
*/
export interface NumberAnimationProps {This one comes with the course.
This component comes with the course, or with a membership.
One membership covers all four courses and Brands.
- All lessons in the four Learn courses
- All brand breakdowns in the Brands section
- All quizzes, flashcards and crosswords
- An AI teacher on every lesson, for up to 60 questions a day
- A scored final project and a portfolio card in every course
- A portfolio page for the work you pass
- All course material published during the membership
Price
One course is $29, paid once.One course is ₹1,499 + GST, paid once. Membership is charged at $20 each month until it is cancelled. Lifetime access is $60, paid once.Membership is charged at ₹699 + GST each month until it is cancelled. Lifetime access is ₹4,999 + GST, paid once.