{"id":19431426,"url":"https://github.com/devhau/toasti","last_synced_at":"2026-03-19T09:51:42.008Z","repository":{"id":65724233,"uuid":"598227533","full_name":"devhau/toasti","owner":"devhau","description":"Simple javascript toast notifications","archived":false,"fork":false,"pushed_at":"2023-02-07T17:41:55.000Z","size":215,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-06T21:22:36.787Z","etag":null,"topics":["notifications","toast","toast-library","toast-message","toast-notifications","toastr"],"latest_commit_sha":null,"homepage":"","language":"SCSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/devhau.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-06T17:09:08.000Z","updated_at":"2024-11-21T16:51:12.000Z","dependencies_parsed_at":"2023-02-19T16:45:28.502Z","dependency_job_id":null,"html_url":"https://github.com/devhau/toasti","commit_stats":{"total_commits":10,"total_committers":2,"mean_commits":5.0,"dds":"0.30000000000000004","last_synced_commit":"daaed3b8aa1939e2bacda84b55b0ee1f19a59afb"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/devhau/toasti","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devhau%2Ftoasti","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devhau%2Ftoasti/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devhau%2Ftoasti/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devhau%2Ftoasti/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devhau","download_url":"https://codeload.github.com/devhau/toasti/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devhau%2Ftoasti/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30001652,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-02T11:09:27.951Z","status":"ssl_error","status_checked_at":"2026-03-02T11:08:53.255Z","response_time":60,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["notifications","toast","toast-library","toast-message","toast-notifications","toastr"],"created_at":"2024-11-10T14:29:35.396Z","updated_at":"2026-03-02T12:04:27.455Z","avatar_url":"https://github.com/devhau.png","language":"SCSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"# toasti\n**toasti** is a Javascript library for non-blocking notifications and without jQuery. The goal is to create a simple core library that can be customized and extended.\n\n\n## Demo\n- Demo can be found at https://toasti.hau.xyz\n\n## Install\n\n#### [npm](https://www.npmjs.com/package/toasti)\n```\nnpm install --save toasti\n```\n\n#### [yarn](https://yarnpkg.com/en/package/toasti)\n```\nyarn add toasti\n```\n\n\n\n## Wiki and Change Log\n[Wiki including Change Log](https://github.com/devhau/toasti/wiki)\n\n## Breaking Changes\n\n#### Animation Changes\nThe following animations options have been deprecated and should be replaced:\n\n - Replace `options.fadeIn` with `options.showDuration`\n - Replace `options.onFadeIn` with `options.onShown`\n - Replace `options.fadeOut` with `options.hideDuration`\n - Replace `options.onFadeOut` with `options.onHidden`\n\n## Quick Start\n\n### 3 Easy Steps\nFor other API calls, see the [demo](https://toasti.hau.xyz).\n\n1. Link to toasti.css `\u003clink href=\"toasti.css\" rel=\"stylesheet\"/\u003e`\n\n2. Link to toasti.js `\u003cscript src=\"toasti.js\"\u003e\u003c/script\u003e`\n\n3. use toasti to display a toast for info, success, warning or error\n\t```js\n\t// Display an info toast with no title\n\ttoasti.info('Are you the 6 fingered man?')\n\t```\n\n### Other Options\n```js\n// Display a warning toast, with no title\ntoasti.warning('My name is Inigo Montoya. You killed my father, prepare to die!')\n\n// Display a success toast, with a title\ntoasti.success('Have fun storming the castle!', 'Miracle Max Says')\n\n// Display an error toast, with a title\ntoasti.error('I do not think that word means what you think it means.', 'Inconceivable!')\n\n// Immediately remove current toasts without using animation\ntoasti.remove()\n\n// Remove current toasts using animation\ntoasti.clear()\n\n// Override global options\ntoasti.success('We do have the Kapua suite available.', 'Turtle Bay Resort', {timeOut: 5000})\n```\n\n### Escape HTML characters\nIn case you want to escape HTML characters in title and message\n\n\ttoasti.options.escapeHtml = true;\n\n### Close Button\nOptionally enable a close button\n```js\ntoasti.options.closeButton = true;\n````\n\nOptionally override the close button's HTML.\n\n```js\ntoasti.options.closeHtml = '\u003cbutton\u003e\u003ci class=\"icon-off\"\u003e\u003c/i\u003e\u003c/button\u003e';\n```\n\nYou can also override the CSS/LESS for `#toast-container .toast-close-button`\n\nOptionally override the hide animation when the close button is clicked (falls back to hide configuration).\n```js\ntoasti.options.closeMethod = 'fadeOut';\ntoasti.options.closeDuration = 300;\ntoasti.options.closeEasing = 'swing';\n```\n\n### Display Sequence\nShow newest toast at bottom (top is default)\n```js\ntoasti.options.newestOnTop = false;\n```\n\n### Callbacks\n```js\n// Define a callback for when the toast is shown/hidden/clicked\ntoasti.options.onShown = function() { console.log('hello'); }\ntoasti.options.onHidden = function() { console.log('goodbye'); }\ntoasti.options.onclick = function() { console.log('clicked'); }\ntoasti.options.onCloseClick = function() { console.log('close button clicked'); }\n```\n\n### Animation Options\ntoasti will supply default animations, so you do not have to provide any of these settings. However you have the option to override the animations if you like.\n\n#### Easings\nOptionally override the animation easing to show or hide the toasts. Default is swing. swing and linear are built into jQuery.\n```js\ntoasti.options.showEasing = 'swing';\ntoasti.options.hideEasing = 'linear';\ntoasti.options.closeEasing = 'linear';\n```\n\nUsing the jQuery Easing plugin (http://www.gsgd.co.uk/sandbox/jquery/easing/)\n```js\ntoasti.options.showEasing = 'easeOutBounce';\ntoasti.options.hideEasing = 'easeInBack';\ntoasti.options.closeEasing = 'easeInBack';\n```\n\n#### Animation Method\nUse the jQuery show/hide method of your choice. These default to fadeIn/fadeOut. The methods fadeIn/fadeOut, slideDown/slideUp, and show/hide are built into jQuery.\n```js\ntoasti.options.showMethod = 'slideDown';\ntoasti.options.hideMethod = 'slideUp';\ntoasti.options.closeMethod = 'slideUp';\n```\n\n### Prevent Duplicates\nRather than having identical toasts stack, set the preventDuplicates property to true. Duplicates are matched to the previous toast based on their message content.\n```js\ntoasti.options.preventDuplicates = true;\n```\n\n### Timeouts\nControl how toasti interacts with users by setting timeouts appropriately.\n```js\ntoasti.options.timeOut = 30; // How long the toast will display without user interaction\ntoasti.options.extendedTimeOut = 60; // How long the toast will display after a user hovers over it\n```\n\n### Prevent from Auto Hiding\nTo prevent toasti from closing based on the timeouts, set the `timeOut` and `extendedTimeOut` options to `0`. The toasti will persist until selected.\n\n```js\ntoasti.options.timeOut = 0;\ntoasti.options.extendedTimeOut = 0;\n```\n\n### Progress Bar\nVisually indicate how long before a toast expires.\n```js\ntoasti.options.progressBar = true;\n```\n\n### rtl\nFlip the toasti to be displayed properly for right-to-left languages.\n```js\ntoasti.options.rtl = true;\n```\n\n## Building toasti\n\nTo build the minified and css versions of toasti you will need [node](http://nodejs.org) installed. (Use Homebrew or Chocolatey.)\n\n```\nnpm install -g gulp karma-cli\nnpm install\n```\n\nAt this point the dependencies have been installed and you can build toasti\n\n- Run the analytics `gulp analyze`\n- Run the test `gulp test`\n- Run the build `gulp`\n\n## Contributing\n\nFor a pull request to be considered it must resolve a bug, or add a feature which is beneficial to a large audience.\n\nPull requests must pass existing unit tests, CI processes, and add additional tests to indicate successful operation of a new feature, or the resolution of an identified bug.\n\nRequests must be made against the `develop` branch. Pull requests submitted against the `master` branch will not be considered.\n\nAll pull requests are subject to approval by the repository owners, who have sole discretion over acceptance or denial.\n\n## License\ntoasti is under MIT license","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevhau%2Ftoasti","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevhau%2Ftoasti","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevhau%2Ftoasti/lists"}