ftoast
v1.0.0
Published
Lightweight toast + dialog system with i18n and theme support
Downloads
100
Maintainers
Readme
FToast
Lightweight toast + dialog system with i18n, light/dark/auto theme, and SweetAlert-like dialogs.
No dependencies. Tailwind-first. FontAwesome not required.
Features
- Toasts (success / info / warning / error + custom)
- Multiple action buttons inside toasts
- Dialogs: alert, confirm, prompt (Promise-based)
- i18n with auto detection and persistence
- Theme support: light / dark / auto
- Fully customizable via classes and templates
Install
npm install ftoastUsage
import "ftoast/dist/ftoast.js";
FToast.success("Saved!");
FToast.error("Something went wrong");Dialogs
await FToast.alert("Maintenance mode");
const ok = await FToast.confirm("Delete item?");
const name = await FToast.prompt("Project name");i18n
FToast.setLang("hu");
FToast.addTranslations("hu", {
"title.success": "Siker"
});Theme
FToast.setTheme("dark"); // dark | light | autoLicense
MIT
