{"id":21811475,"url":"https://github.com/dnbard/knockout.animate","last_synced_at":"2025-04-13T22:24:31.172Z","repository":{"id":22791418,"uuid":"26137686","full_name":"dnbard/knockout.animate","owner":"dnbard","description":"Animate.css custom binding for Knockout.js","archived":false,"fork":false,"pushed_at":"2016-10-23T16:37:43.000Z","size":9,"stargazers_count":14,"open_issues_count":0,"forks_count":6,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-11T01:04:33.847Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://dnbard.github.io/knockout.animate","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dnbard.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-11-03T20:40:15.000Z","updated_at":"2022-10-13T21:54:36.000Z","dependencies_parsed_at":"2022-07-23T18:02:13.157Z","dependency_job_id":null,"html_url":"https://github.com/dnbard/knockout.animate","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnbard%2Fknockout.animate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnbard%2Fknockout.animate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnbard%2Fknockout.animate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnbard%2Fknockout.animate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dnbard","download_url":"https://codeload.github.com/dnbard/knockout.animate/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248789977,"owners_count":21161923,"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-27T13:44:48.605Z","updated_at":"2025-04-13T22:24:31.118Z","avatar_url":"https://github.com/dnbard.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"knockout.animate\n================\n\n*Animate.css custom binding for Knockout.js*\n\n[animate.css](https://github.com/daneden/animate.css) is a bunch of cool, fun, and cross-browser animations for you to use in your projects `now with support of Knockout.js`. Great for emphasis, home pages, sliders, and general just-add-water-awesomeness.\n\nInstalling\n----------\n\nDownload `knockout.animate.min.js` and all dependencies (`animate.css`, `knockout.js`) or use `Bower` command:\n\n```\nbower install knockout.animate\n```\n\nUsage\n-----\n\nTo use `knockout.animate` in your website, simply drop the `animate.css`, `knockout.js` and `knockout.animate.js` into your document's \u003chead\u003e:\n\n```html\n\u003chead\u003e\n  \u003clink rel=\"stylesheet\" href=\"animate.min.css\"\u003e\n  \u003cscript type=\"text/javascript\" src=\"knockout.min.js\"\u003e\u003c/script\u003e\n  \u003cscript type=\"text/javascript\" src=\"knockout.animate.min.js\"\u003e\u003c/script\u003e\n\u003c/head\u003e\n\n```\n\n\nThen add next data-binding to an element:\n\n```html\n\u003cdiv data-bind=\"animate:{ animation: 'zoomIn', state: true\"\u003e\u003c/div\u003e\n```\n\nThat's it! You've got a CSS animated element. Super!\n\nUse observable to control animation\n-----------------------------------\n\nYou can control when animation is going to happen by assigning `Knockout Observable` to `state` field:\n\n```html\n\u003cdiv data-bind=\"animate:{ animation: 'zoomIn', state: state\"\u003e\u003c/div\u003e\n```\n\n```js\nfunction Viewmodel(){\n  this.state = ko.observable(true);\n}\n\nko.applyBindings(new Viewmodel());\n```\n\nAnimation will be played when observable become `true`.\n\nAssign `in` and `out` states and toggle between them\n----------------------------------------------------\n\nYou can add `in` and `out` animation this way:\n\n```html\n\u003cdiv data-bind=\"animate:{ animation: ['zoomIn', 'zoomOut'], state: state\"\u003e\u003c/div\u003e\n```\n\nFirst animation will be played when `state` field become `true` and second when `false`.\n\nAssign custom handler on state change\n-------------------------------------\n\n```html\n\u003cdiv data-bind=\"animate:{ animation: 'zoomIn', state: state, handler: handler\"\u003e\u003c/div\u003e\n```\n\n```js\nfunction Viewmodel(){\n  this.state = ko.observable(true);\n  \n  this.handler = function(event, state){\n    //do something here\n  }\n}\n\nko.applyBindings(new Viewmodel());\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdnbard%2Fknockout.animate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdnbard%2Fknockout.animate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdnbard%2Fknockout.animate/lists"}