Who it is forA developer whose app triggers an AI action from a button or status line and needs a visible wait state before any text arrives.
The problemUsers click a button and see nothing change while the model works, so they may click again or assume the app is stuck.
The outcomeThe button or status row shows an animated indicator with a clear label until the response starts.
What you need first
- Node.js and npm to install the package
- A React app using React 18 or newer
- A streaming or pending response source, such as a fetch endpoint, for the text and status cases
Steps
- Run
npm install generative-loadersin the project. - Import InlineLoader and the styles stylesheet from Generative Loaders.
- Render InlineLoader next to the pending text, choosing a variant such as dot-pulse or spark and a size.
- Add a label prop when the loader stands alone, or leave it off when adjacent text already describes the activity.
- Trigger a slow request and confirm the indicator appears and stops when the response begins.
Prompt for your agent
In the kasturibuilds/generative-loaders package, add an InlineLoader to the pending state of <component-name> with a label that describes the request. Expected output: the updated component and a one-line summary of the chosen variant. Verify that the label is set when the loader has no nearby text describing the activity.
Caveat. The README says InlineLoader avoids duplicate announcements only when adjacent text already describes the activity, so standalone uses need the label prop.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for kasturibuilds/generative-loaders and "Show a compact wait indicator on buttons and status rows"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer