Sign up and get 15% off the four courses and Lifetime.

Burst button

For actions that take a moment, like sending a brief: the label turns into a spinner, then a tick with a burst of small chips, or shakes on an error. The width follows each label.

Members·React and Tailwind

Try it

How to use this

  1. 01

    Make a file called burst-button.tsx in your project's components folder.

  2. 02

    Install what it needs: npm install framer-motion lucide-react

  3. 03

    Paste the code in, keeping the licence note at the top.

  4. 04

    Import it where you want it and change the words, colours and sizes to yours.

The code

"use client";

import { AnimatePresence, MotionConfig, motion, useAnimationControls, useReducedMotion } from "framer-motion";
import { AlertCircle } from "lucide-react";
import { type ComponentProps, type MouseEvent, type ReactNode, useEffect, useLayoutEffect, useRef, useState } from "react";

const cn = (...c: (string | false | null | undefined)[]) => c.filter(Boolean).join(" ");

export type BurstButtonStatus = "idle" | "pending" | "success" | "error";
export type BurstButtonVariant = "solid" | "accent" | "lime" | "outline";
export type BurstButtonSize = "sm" | "md" | "lg";
Member

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.

NextSweep button