{"id":19828240,"url":"https://github.com/eltonsantos/rails_toastify","last_synced_at":"2025-09-01T22:40:36.335Z","repository":{"id":245724330,"uuid":"819074350","full_name":"eltonsantos/rails_toastify","owner":"eltonsantos","description":"🎉 Rails Toastify allows you to add notifications to your app with ease. Pay Attention: this gem still is in development. Please CONTRIBUTE","archived":false,"fork":false,"pushed_at":"2024-10-19T20:33:12.000Z","size":34,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-09T20:57:31.507Z","etag":null,"topics":["rails-toastiify","ruby","ruby-gem","toast","toastify"],"latest_commit_sha":null,"homepage":"https://rubygems.org/gems/rails_toastify","language":"Ruby","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/eltonsantos.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"MIT-LICENSE.md","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,"zenodo":null}},"created_at":"2024-06-23T17:47:05.000Z","updated_at":"2025-07-02T13:49:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"2414ba6e-b269-4b5a-8c18-1e8d35966399","html_url":"https://github.com/eltonsantos/rails_toastify","commit_stats":null,"previous_names":["eltonsantos/rails_toastify"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/eltonsantos/rails_toastify","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eltonsantos%2Frails_toastify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eltonsantos%2Frails_toastify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eltonsantos%2Frails_toastify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eltonsantos%2Frails_toastify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eltonsantos","download_url":"https://codeload.github.com/eltonsantos/rails_toastify/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eltonsantos%2Frails_toastify/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273203236,"owners_count":25063275,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-01T02:00:09.058Z","response_time":120,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["rails-toastiify","ruby","ruby-gem","toast","toastify"],"created_at":"2024-11-12T11:15:23.598Z","updated_at":"2025-09-01T22:40:36.329Z","avatar_url":"https://github.com/eltonsantos.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RailsToastify\n\n**Rails Toastify** allows you to easily add notifications to your app. Please CONTRIBUTE.\n\nThe **Rails Toastify** gem is completely inspired by the [React Toastify](https://fkhadra.github.io/react-toastify/introduction/) lib and is specially made for those React developers who are migrating to Rails thanks to Hotwire or for any other reason, and who love using Toasts and wanted a gem that makes it as easy as it is in React. 🎉\n\nTo see the pure html, css and javascript that originated this gem, just access this **[codepen](https://codepen.io/eltin182/pen/QWXLaWj)** link.\n\n## Installation\n\nAdd gem in your Gemfile:\n\n```ruby\ngem 'rails_toastify'\n```\nand run **bundle install**\n\nAfter run:\n\n```sh\nrails generate rails_toastify:install\n```\n\nThis will create a file *config/initializers/rails_toastify.rb* where you can define what configuration you want to use:\n\n```ruby\nRailsToastify.setup do |configuration|\n  configuration.position = 'toast-container-top-right'\n  configuration.notice_animation = 'bounce' # bounce, slide, flip, zoom \n  configuration.alert_animation = 'slide' # bounce, slide, flip, zoom\n  configuration.notice_duration = 3000\n  configuration.alert_duration = 3000\n  configuration.notice_theme = 'light' # light, dark\n  configuration.alert_theme = 'light' # light, dark\n  configuration.notice_type = 'default' # default, success, warning, error, info\n  configuration.alert_type = 'error' # default, success, warning, error, info\nend\n```\n\n## Usage\n\nIn your *application.html.erb* add in your header:\n\n```ruby\n\u003c%= stylesheet_link_tag 'rails_toastify', media: 'all', 'data-turbolinks-track': 'reload' %\u003e\n\u003c%= javascript_include_tag 'rails_toastify', 'data-turbo-track': 'reload' %\u003e\n```\nAnd in your body:\n\n```html\n\u003c%= rails_toastify_container %\u003e\n\u003c%= rails_toastify_script %\u003e\n```\nAnd call function `RailsToastify.show` any javascript or console:\n\n```ruby\nRailsToastify.show('This is a message!', { theme: 'light', type: 'default', animation: 'bounce', duration: 3000 });\n```\n\nTo see notice or alert in a toast add this in application.html.erb:\n\n```html \n\u003c% if notice %\u003e\n  \u003cscript\u003e\n    RailsToastify.show('\u003c%= notice %\u003e',\n      { theme: '\u003c%= RailsToastify.configuration.notice_theme %\u003e',\n        type: '\u003c%= RailsToastify.configuration.notice_type %\u003e',\n        animation: '\u003c%= RailsToastify.configuration.notice_animation %\u003e',\n        duration: \u003c%= RailsToastify.configuration.notice_duration %\u003e\n      })\n  \u003c/script\u003e\n\u003c% end %\u003e\n\n\u003c% if alert %\u003e\n  \u003cscript\u003e\n    RailsToastify.show('\u003c%= alert %\u003e',\n      { theme: '\u003c%= RailsToastify.configuration.alert_theme %\u003e',\n        type: '\u003c%= RailsToastify.configuration.alert_type %\u003e',\n        animation: '\u003c%= RailsToastify.configuration.alert_animation %\u003e',\n        duration: \u003c%= RailsToastify.configuration.alert_duration %\u003e\n      })\n  \u003c/script\u003e\n\u003c% end %\u003e\n```\n** Note that toast can be configured for either notice type or alert type. Both types or just one of the types can be used.\n\n## Next steps\n\n- Add tests\n- Add others positions (left, center, bottom)\n- Add fade in and fade out animation\n- In addition to the colors, allow the user to choose any color for the progress bar\n\n## Requirements\n\n- Ruby \u003e= 2.6.0 (recommended 2.7+)  \n- Rails \u003e= 6.0 (compatible up to Rails 7)\n  \n## Contributing to Rails Toastify\n\nFork, fix, then send a pull request. Bug reports and pull requests are welcome on GitHub at **https://github.com/eltonsantos/rails_toastify**.\n\n## License\n\nThis gem is available as open-source under the terms of The MIT License (MIT).\n\nCopyright (c) 2024 **[Elton Santos](https://eltonmelosantos.com.br)**. See **MIT-LICENSE** for further details and see **CHANGELOG** to see what was changed.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feltonsantos%2Frails_toastify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feltonsantos%2Frails_toastify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feltonsantos%2Frails_toastify/lists"}