Releases: pheralb/toast
v1.0.0
✨ What's Changed
- Support for React 19.
- Introducing
toastOptions
property:- Change the default font for all toasts using
font
property. - Change the default icons for loading, success, warning, error & info with
icons
property. - Now you can customize all notifications using your styles with
classNames
orheadless
+classNames
. - Modify the content of the actions & close buttons with the
defaultActionContent
&defaultCloseContent
property. - You can now change the animation of the notification when it closes. Use
animationOnClose
+slide
(default) orswipe
.
- Change the default font for all toasts using
- Exports a CSS file bundled & minified with Lightning CSS. Only use in case the library's styles are not displayed correctly. This resolves the routing issue in Astro with View Transitions (example - more information).
🔎 Breaking Changes
toastFont
is nowtoastOptions={{ font: '' }}
(more information).
v0.2.3
✨ What's Changed
- ⚙️ Accessibility fixes for each notification & for the
Action
&Close
buttons. - 🚨 Add
.loading
variant (docs):
toast.loading({
text: 'Loading',
options: {
promise: yourFunction(),
success: 'Ready',
error: 'Error',
autoDismiss: true,
},
});
- 📚 Improved docs, fixed some links & updated
Toast
examples.
v0.2.2
💥 Breaking Changes
-
The
<ToasterProvider />
component has been removed. To render all toasts, use the<Toaster />
component instead. This change maintains the same API as previous versions. For more information, refer to the documentation.import { Toaster } from '@pheralb/toast'; <Toaster theme="light" maxToast={6} ... />
-
The
useToast
hook has been removed. To render a single toast anywhere in your application, use thetoast()
function. The API remains consistent with previous versions. For more details, see the documentation.import { toast } from '@pheralb/toast'; toast.success({ text: '✨ Hello', });
✨ What's Changed
-
💙 Types:
TheToastPosition
andToastVariant
types are now exported, allowing you to use them in your TypeScript projects for better type safety and autocompletion. -
📚 Documentation Update:
All examples have been updated to reflect the newtoast()
function and<Toaster />
component. -
📄 New Guide:
An Astro framework guide has been added to the documentation. This guide provides step-by-step instructions on how to integrate and use the library within Astro projects.
v0.1.3
✨ What's Changed
- Add
.default
,.info
,.success
,.error
,.warning
and.info
variants. - Add support for React Server Components (Next.js).
use client
by default. - Disable transitions if the user has disabled them in the system (
prefers-reduced-motion
). - Export
ToastProperties
,ToastProviderProperties
andToastTheme
types.
The first version of the library 🚀