Make the wait visible.
People shouldn’t have to wonder whether their click worked. Pending icons and success or error colors give the action a visible rhythm.
Small component. Thoughtful feedback.
A standard button registers a click. AIconButton follows the promise: a spin while it works, a green glow when it succeeds, and a clear way back when it fails.
React 18 / 19 MUI 6 TypeScript ready
Choose a path. Give the button a click.
Real component. Simulated save. No backend.
People shouldn’t have to wonder whether their click worked. Pending icons and success or error colors give the action a visible rhythm.
Await your action in one callback. The component handles its feedback and ignores extra clicks on that button while the request runs.
Your theme, your icons, your button props. Add async feedback without inventing another button system or another styling language.
Small addition. Better feeling.
Import the stylesheet, pass an async action, and give it a good name. Resolve for success; throw for a dismissible error.
Read the full usage guidenpm install @relativity/mui-action-buttonsimport { AIconButton } from '@relativity/mui-action-buttons';
import '@relativity/mui-action-buttons/styles.css';
<AIconButton onClick={async () => { await saveChanges(); }}>
Save my masterpiece
</AIconButton>
Use with compatible React, MUI, and Emotion peers. Add a start or end icon for the spinner.