{ "data" : { "toasts[]" : "An array of toast objects (see toast object below)", "toastsHovered": "When the toasts are hovered, this will be sent to true.", "expanded" : "A boolean value that indicates whether or not the toasts are expanded", "layout" : "You can choose the 'default' layout or have them 'expanded' by default", "position": "The position of the toast notifications", "paddingBetweenToasts": "When expanded the padding to add between the toasts", "deleteToastWithId(id)": "Delete a toast with the given id", "burnToast(id)": "This method will add the exit animation to the last toast and delete it", "getToastWithId(id)": "Get the toast with the given id", "stackToasts()" : "Stack the toasts on top of each other", "positionToasts()" : "Position the toasts based on their index and the current layout", "alignBottom()" : "Align element2 to be at the bottom of element1", "alignTop()" : "Align element2 to be at the top of element1", "resetBottom()" : "Reset all toasts to bottom of 0px", "resetTop()" : "Reset all toasts to top of 0px", "getBottomPositionOfElement(el)": "Get the bottom position of the given element", "calculateHeightOfToastsContainer()": "Calculate the height of the toasts container", "@set-toasts-layout.window": "This is an event listener to change the layout of the toasts", "@toast-show.window": "This is an event listener to show a toast notification" }, "alert_notification" : { "title" : "Usage", "description" : "

Copy the code from inside the <template x-teleport=\"body\">..</template> tags and add it to your project. You may want to add the window.toast global function to your site to make it easily pop a toast('Message'). This global function is located inside the x-init method on the root element.

" }, "additional" : { "description" : "Here is the default structure of a toast object:

When using the toast() global function you can create a simple toast with the following syntax: toast('Message') or you can pass in an object to create a more complex toast: toast('Message', {type: 'success', description: 'short description', position: 'top-right', html: ''})

" } }