Toast - Aspect UI

The Toast component displays brief messages to notify users about app events or actions. It supports different types (success, error, info), animations, positioning, and auto-dismiss.

Table of Contents#

Toast option Props#


PropTypeDefaultDescription
classNamestring-Additional CSS class for the toast element.
containerClassNamestring-Additional CSS class for the toast container element.
messagestring-Main message text displayed in the toast.
descriptionstring-Optional secondary text displayed below the main message.
messageClassNamestring-CSS class applied to the toast message text.
messageAreaClassNamestring-CSS class applied to the container holding the message and description.
descriptionClassNamestring-CSS class applied to the toast description text.
typesuccess error info warning-Type of the toast, which can affect styling and icon.
durationnumber-Duration in milliseconds before the toast automatically disappears.
actionToastAction-Optional action button configuration for the toast.
idstring-Optional ID for the toast. If not provided, one may be auto-generated.