{"id":21076113,"url":"https://github.com/shaack/bootstrap-show-notification","last_synced_at":"2025-05-16T06:31:59.786Z","repository":{"id":43454762,"uuid":"279687412","full_name":"shaack/bootstrap-show-notification","owner":"shaack","description":"A jQuery plugin wrapper around Bootstrap Alerts, to create Notifications (Toasts)","archived":false,"fork":false,"pushed_at":"2022-09-07T13:43:39.000Z","size":129,"stargazers_count":14,"open_issues_count":1,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-08-09T12:12:20.164Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/shaack.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}},"created_at":"2020-07-14T20:33:38.000Z","updated_at":"2024-05-28T23:51:22.000Z","dependencies_parsed_at":"2023-01-17T22:45:21.355Z","dependency_job_id":null,"html_url":"https://github.com/shaack/bootstrap-show-notification","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shaack%2Fbootstrap-show-notification","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shaack%2Fbootstrap-show-notification/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shaack%2Fbootstrap-show-notification/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shaack%2Fbootstrap-show-notification/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shaack","download_url":"https://codeload.github.com/shaack/bootstrap-show-notification/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225412927,"owners_count":17470473,"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","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":[],"created_at":"2024-11-19T19:26:44.571Z","updated_at":"2024-11-19T19:26:45.114Z","avatar_url":"https://github.com/shaack.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bootstrap-show-notification\n\n\u003e This component is Bootstrap 4 only. For a Bootstrap 5 compatible\n\u003e component with similar functionality, see [bootstrap-show-toast](https://github.com/shaack/bootstrap-show-toast).\n\nA jQuery plugin wrapper around Bootstrap 4 Alerts, to show them as toasts (also called notifications) dynamically from JavaScript.\n\n![bootstrap-show-notification Example](https://shaack.com/projekte/assets/img/bootstrap-show-notification-lg.png?v=2)\n\n=\u003e \n- Responsive and mobile friendly\n- Needs no extra CSS\n\n## Try it\n\n- [Demo Page](https://shaack.com/projekte/bootstrap-show-notification/)\n\n## Installation\n\n- [npm package](https://www.npmjs.com/package/bootstrap-show-notification)\n\n```sh\nnpm install bootstrap-show-notification\n```\n\n## Usage\n\n```html\n\u003cscript src=\"./node_modules/bootstrap-show-notification/src/bootstrap-show-notification.js\"\u003e\u003c/script\u003e\n\u003cscript\u003e\n    // simple example\n    $(\"#button-show-simple\").click(function () {\n        $.showNotification({body: \"Hello Notification!\"})\n    })\n    // type info and more complex body\n    $(\"#button-show-info\").click(function () {\n        $.showNotification({\n            body: \"\u003ch3\u003eFor your Info\u003c/h3\u003eThis notification has a title and a body and more text than the previous one.\", type: \"info\"\n        })\n    })\n    // type danger\n    $(\"#button-show-danger\").click(function () {\n        $.showNotification({\n            body: \"Danger!\", type: \"danger\"\n        })\n    })\n    // type secondary and sticky\n    $(\"#button-show-sticky\").click(function () {\n        $.showNotification({\n            body: \"This notification will stay\", type: \"secondary\", duration: 0\n        })\n    })\n\u003c/script\u003e\n```\n\n## Props (defaults)\n\n```js\nthis.props = {\n    body: \"\", // the text, shown\n    type: \"primary\", // the appearance\n    duration: 5500, // duration till auto-hide, set to `0` to disable auto-hide\n    maxWidth: \"520px\", // the notification maxWidth\n    shadow: \"0 2px 6px rgba(0,0,0,0.2)\", // the box-shadow\n    zIndex: 100,\n    margin: \"1rem\", // the margin (above maxWidth)\n    direction: \"prepend\" // or \"append\", the stack direction\n}\n```\n\n## Documentation\n\n- [Repository and documentation](https://github.com/shaack/bootstrap-show-notification)\n\n## More Bootstrap extensions\n\nCheck out my [further Bootstrap extensions](https://shaack.com/en/open-source-components)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshaack%2Fbootstrap-show-notification","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshaack%2Fbootstrap-show-notification","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshaack%2Fbootstrap-show-notification/lists"}