Waqar H. Syed

Save With Progress

Buttons 9

About

A save button that shows a continuous progress bar during asynchronous requests.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Save With Progress to your project and fits it to your theme.

Code

How Save With Progress is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

"use client";
import * as React from "react";
import Component, { type Props, type State } from "@/components/ui/save-with-progress";
const settings = {"title": "Save changes", "showContext": true};
const ease=(x:number)=>{x=Math.max(0,Math.min(1,x));return x*x*(3-2*x)};
const pulse=(t:number,a:number,b:number)=>ease((t-a)/.3)*(1-ease((t-b)/.3));
export function showcase(time:number):State{const t=((time%6)+6)%6;return t<.8?{active:0,reveal:0}:t<3?{active:1,reveal:ease((t-.8)/2.2)}:t<5?{active:2,reveal:1,notice:'Your draft is up to date.'}:{active:0,reveal:0};}
export default function Demo(props:Props & {showcaseTime?:number}){
 const {showcaseTime,...incoming}=props;const merged={...settings,...incoming};
 return <div style={{width:"100%",minWidth:0}}><Component {...merged} state={showcaseTime===undefined?incoming.state:showcase(showcaseTime)} seeking={showcaseTime!==undefined||incoming.seeking}/></div>;
}

More by Waqar H. Syed

View all
  • Build Pipeline

    Build Pipeline

    181
  • Focus City

    Focus City

    131
  • Scroll animated timeline

    Scroll animated timeline

    125
  • Storage District

    Storage District

    68
  • Glowing Pricing Tiers

    Glowing Pricing Tiers

    52
  • Thumbnail image viewer

    Thumbnail image viewer

    52
  • Before after comparison

    Before after comparison

    38
  • Featured Project Hero

    Featured Project Hero

    32

More in Buttons

View all
  • Texture Button

    Texture Button

    93
  • Eclipse Button

    Eclipse Button

    5
  • App Store Button

    App Store Button

    457
  • Button Group

    Button Group

  • Button

    Button

    32
  • Button

    Button

    14
  • Button

    Button

    65
  • Astryx Button Group

    Astryx Button Group

    22