Animated Button

Displays a button that has an animated loading state

Overview

This animated button can be used to display a loading state

Usage

Import the component into a client component or page as it uses useState to manage the idle, loading and success state. Wire it up with your function and pass it into the onClick method

Props

PropValues
variant"default", "outline"
size"default", "lg"
import { Button } from "@/components/ui/button"

<Button>Save</Button>