{"id":13700261,"url":"https://github.com/BinarCode/vue-notifyjs","last_synced_at":"2025-05-04T18:34:48.915Z","repository":{"id":48020665,"uuid":"95671646","full_name":"BinarCode/vue-notifyjs","owner":"BinarCode","description":"Minimalist 1kb Notification component","archived":false,"fork":false,"pushed_at":"2022-12-07T01:01:06.000Z","size":657,"stargazers_count":168,"open_issues_count":28,"forks_count":27,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-05-03T06:06:04.531Z","etag":null,"topics":["component","notifications","vue","vuejs2"],"latest_commit_sha":null,"homepage":"","language":"CSS","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/BinarCode.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":"2017-06-28T13:25:08.000Z","updated_at":"2025-03-07T02:40:50.000Z","dependencies_parsed_at":"2023-01-24T12:45:46.926Z","dependency_job_id":null,"html_url":"https://github.com/BinarCode/vue-notifyjs","commit_stats":null,"previous_names":["cristijora/vue-notifyjs"],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BinarCode%2Fvue-notifyjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BinarCode%2Fvue-notifyjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BinarCode%2Fvue-notifyjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BinarCode%2Fvue-notifyjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BinarCode","download_url":"https://codeload.github.com/BinarCode/vue-notifyjs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252277054,"owners_count":21722459,"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":["component","notifications","vue","vuejs2"],"created_at":"2024-08-02T20:00:52.489Z","updated_at":"2025-05-04T18:34:43.871Z","avatar_url":"https://github.com/BinarCode.png","language":"CSS","funding_links":[],"categories":["CSS",":clap: 欢迎参与​","UI Components"],"sub_categories":["js框架","Notification"],"readme":"# vue-notifyjs\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.npmjs.com/package/vue-notifyjs\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/vue-notifyjs.svg\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/vue-notifyjs\"\u003e\u003cimg src=\"https://img.shields.io/npm/dt/vue-notifyjs.svg\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/vue-notifyjs\"\u003e\u003cimg src=\"https://img.shields.io/badge/license-MIT-blue.svg\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://twitter.com/intent/tweet?text=Wow:\u0026url=%5Bobject%20Object%5D\"\u003e\u003cimg src=\"https://img.shields.io/twitter/url/https/github.com/cristijora/vue-notifyjs.svg?style=social\"\u003e\u003c/a\u003e\n  \u003ca href=\"http://img.badgesize.io/cristijora/vue-notifyjs/master/dist/vue-notifyjs.min.js.svg?compression=gzip\u0026style=flat-square\"\u003e\u003cimg src=\"http://img.badgesize.io/cristijora/vue-notifyjs/master/dist/vue-notifyjs.min.js.svg?compression=gzip\u0026style=flat-square\"\u003e\u003c/a\u003e\n\u003c/p\u003e\nMinimalist notification component for Vue 2.x\n\nWhy use it?\n- Small: 1.5kb (minified \u0026 gzipped), 4kb (minified)\n- Simple `this.$notify({message:'My message'})`\n- Has multiple themes \n- The animations can be customized through Vue transitions\n- Can be used both through npm and as a script tag\n\n### Demos: \n- [jsFiddle demo](https://jsfiddle.net/z11fe07p/2879/)\n- [Overlaping notifications](https://jsfiddle.net/z11fe07p/2878/)\n- [Custom html content via components](https://jsfiddle.net/z11fe07p/2880/)\n- [Custom animations](https://jsfiddle.net/z11fe07p/2882/)\n- [Clears all current notifications](https://jsfiddle.net/z11fe07p/2883/)\n\n### 3 themes supported\n#### [Default theme](https://jsfiddle.net/z11fe07p/2879/)\n#### [Material design theme](https://jsfiddle.net/z11fe07p/2884/)\n#### [Now-ui theme](https://jsfiddle.net/z11fe07p/2886/)\n\n## Install\n\n```bash\nyarn add vue-notifyjs\n```\n\n### CDN JS: \n* https://unpkg.com/vue-notifyjs/dist/vue-notifyjs.min.js\n* https://unpkg.com/vue-notifyjs/dist/vue-notifyjs.js\n\n### CDN CSS: \n* https://unpkg.com/vue-notifyjs/themes/default.css\n* https://unpkg.com/vue-notifyjs/themes/material.css\n* https://unpkg.com/vue-notifyjs/themes/now-ui.css\n\n## Usage\n\n```vue\n\u003ctemplate\u003e\n  \u003cnotifications\u003e\u003c/notifications\u003e\n\u003c/template\u003e\n\n\u003cscript\u003e\nimport Notify from 'vue-notifyjs'\nVue.use(Notify)\n\nexport default {\n   methods: {\n    addNotification() {\n      this.$notify({\n        message: 'Welcome',\n        type: 'success'\n      })\n    }\n  }\n}\n\u003c/script\u003e\n\u003c!-- import styles --\u003e\n\u003cstyle src=\"vue-notifyjs/themes/default.css\"\u003e\u003c/style\u003e\n\n```\n**Note:** `\u003cnotifications\u003e\u003c/notifications\u003e` can be declared only once anywhere in your app,\npreferably in your root component so the notification component is alive inside any other components.\n\n## Notification options\nYou can set notification options in 3 ways\n\n1. Upon plugin initialization\n\n```js\nimport Notify from 'vue-notifyjs'\nVue.use(Notify, {type: 'primary', timeout: 2000})\n```\n2. Dynamically via `setOptions` method\n\n```js\nthis.$notifications.setOptions({\n  type: 'primary', \n  timeout: 2000,\n  horizontalAlign: 'right',\n  verticalAlign: 'top'\n})\n```\n\n3. When using `$notify`\n\n```js\nthis.$notify({\n  message: 'Welcome',\n  type: 'success'\n})\n```\n\n**Note:** Options sent through `this.$notify` will override default options and will have higher priority than default options.\n\n## Props\n\n## Notifications \n\n```js\ntransitionName: {\n type:String,\n default:'list'\n},\ntransitionMode: {\n type:String,\n default:'in-out'\n},\noverlap: {\n type: Boolean,\n default: false\n}\n```\n\n## Notification (passed through the object sent to $notify method)\n```js\nprops: {\n  message: String,\n  title: String,\n  icon: String,\n  verticalAlign: {\n    type: String,\n    default: 'top' // top | bottom\n  },\n  horizontalAlign: {\n    type: String,\n    default: 'center' // right | center | left\n  },\n  type: {\n    type: String,\n    default: 'info' // info | warning | danger | success | primary\n  },\n  timeout: {\n    type: Number,\n    default: 5000\n  },\n  timestamp: {\n    type: Date,\n    default: () =\u003e new Date()\n  },\n  component: {  //is rendered instead of notification message\n    type: [Object, Function]\n  },\n  showClose: {\n      type: Boolean,\n      default: true\n  },\n  closeOnClick: {\n      type: Boolean,\n      default: true\n  },\n  clickHandler: Function,\n},\n```\n## Methods\n\nclear() - Clears all current notifications\n```js\nthis.$notifications.clear();\n```\n\n## Contributing\n\n1. Fork it!\n2. Create your feature branch: `git checkout -b my-new-feature`\n3. Commit your changes: `git commit -am 'Add some feature'`\n4. Push to the branch: `git push origin my-new-feature`\n5. Submit a pull request :D\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FBinarCode%2Fvue-notifyjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FBinarCode%2Fvue-notifyjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FBinarCode%2Fvue-notifyjs/lists"}