About
A small inline status readout for a form or document that shows whether changes are saved, saving, unsaved, or failed to save, with a live relative "last saved" timestamp and inline save-now/retry actions.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Save Indicator to your project and fits it to your theme.
Code
How Save Indicator is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
"use client";
import { SaveIndicator } from "@/components/ui/save-indicator";
import { useState } from "react";
export default function SaveIndicatorDirtyDemo() {
const [state, setState] = useState<"dirty" | "saving" | "saved">("dirty");
const [lastSavedAt] = useState(() => new Date(Date.now() - 12 * 60 * 1000));
function handleSaveNow() {
setState("saving");
setTimeout(() => setState("saved"), 1200);
}
return (
<div className="flex min-h-[220px] w-full items-center justify-center bg-background p-8">
<div className="w-80 rounded-xl border border-border bg-card p-4 shadow-sm">
<p className="text-sm font-semibold text-card-foreground">
Display name
</p>
<input
defaultValue="Alex Rivera"
className="mt-2 w-full rounded-lg border border-border bg-muted px-3 py-2 text-sm text-foreground"
/>
<div className="mt-3">
<SaveIndicator
state={state}
lastSavedAt={lastSavedAt}
onSaveNow={handleSaveNow}
/>
</div>
</div>
</div>
);
}
















