{"repo":"tutkli/ngx-sonner","free":true,"listed":false,"github":"https://github.com/tutkli/ngx-sonner","clone":"git clone https://github.com/tutkli/ngx-sonner.git","description":"An opinionated toast component for Angular. A port of @emilkowalski's sonner.","language":"TypeScript","stars":182,"topics":["angular","sonner","toast"],"license":"MIT","category":"ui-components","readme_excerpt":"ngx-sonner An opinionated toast component for Angular. Based on emilkowalski's React implementation. Angular compatibility ngx-sonner @angular ------------ ---------- 2.0.0 ≥18.0.0 1.0.0 ≥17.3.0 Quick start Install it with your favorite package manager: Add to your app, it will be the place where all your toasts will be rendered. After that, you can use toast() from anywhere in your app. Table of contents - toast() - Creating toasts - Default - Success - Info - Warning - Error - Action - Cancel - Promise - Loading - Custom component - Headless - Dynamic position - Other - Updating a toast - On Close Callback - Dismissing toasts programmatically - Toaster - Theme - Position - Expand - Custom Icons - Close button - Rich colors - Custom offset - Duration - Keyboard focus - Styling - TailwindCSS toast() Use it to render a toast. You can call it from anywhere, even outside of React. Creating toasts Default Most basic toast. You can customize it (and any other type) by passing an options object as the second argument. With custom icon and description: Success Renders a checkmark icon in front of the message. Info Renders a question mark icon in front of the message. Warning Renders a warning icon in front of the message. Error Renders an error icon in front of the message. Action Renders a primary button, clicking it will close the toast and run the callback passed via onClick . You can prevent the toast from closing by calling event.preventDefault() in the onClick callback. Cancel","default_branch":null,"files":null,"tree":[],"storefront":"/r/tutkli","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/tutkli/ngx-sonner/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}