Toast
An ink capsule at the bottom center: brief, calm, at most three.
<>
<div className="flex flex-wrap items-center gap-8">
<Button onClick={() => toast("Key copied")}>Copy key</Button>
<Button onClick={() => toast.success("Provider saved")}>Save provider</Button>
<Button onClick={() => toast.error("Couldn't reach the provider.", { description: "Check the provider key, then try again." })}>Test provider</Button>
<Button onClick={() => toast("Key disabled", { action: { label: "Undo", onClick: () => toast("Key enabled") } })}>Disable key</Button>
<Button
onClick={() =>
void toast.promise(new Promise((r) => setTimeout(r, 1600)), { loading: "Syncing models…", success: "Models synced", error: "Couldn't sync models" })
}
>
Sync models
</Button>
</div>
</>import { toast } from "@logicplanes/kaeso-ui";