About
a modern button.... onclick from loading to sent
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Modern button to your project and fits it to your theme.
Code
How Modern button is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
import { StatefulButton } from "@/components/ui/modern-button";
export default function DemoOne() {
// dummy API call
const handleClick = () => {
return new Promise((resolve) => {
setTimeout(resolve, 4000);
});
};
return <div className="min-h-screen w-full bg-background flex items-center justify-center p-8">
<StatefulButton onClick={handleClick}>
Send message
</StatefulButton>
</div>
}
















