{"id":13508542,"url":"https://github.com/icons8/titanic","last_synced_at":"2025-05-15T06:02:59.170Z","repository":{"id":60226056,"uuid":"85344516","full_name":"icons8/titanic","owner":"icons8","description":"A set of animated icons + code to insert them into the webpages","archived":false,"fork":false,"pushed_at":"2020-10-04T09:46:09.000Z","size":1576,"stargazers_count":2441,"open_issues_count":9,"forks_count":214,"subscribers_count":64,"default_branch":"master","last_synced_at":"2025-04-14T10:31:28.364Z","etag":null,"topics":["animated-icons","icons"],"latest_commit_sha":null,"homepage":"https://icons8.com/c/animated-icons","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/icons8.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":"2017-03-17T18:46:56.000Z","updated_at":"2025-04-05T12:54:31.000Z","dependencies_parsed_at":"2022-09-27T00:00:35.284Z","dependency_job_id":null,"html_url":"https://github.com/icons8/titanic","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/icons8%2Ftitanic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icons8%2Ftitanic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icons8%2Ftitanic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icons8%2Ftitanic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/icons8","download_url":"https://codeload.github.com/icons8/titanic/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254283336,"owners_count":22045140,"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":["animated-icons","icons"],"created_at":"2024-08-01T02:00:54.552Z","updated_at":"2025-05-15T06:02:59.030Z","avatar_url":"https://github.com/icons8.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","awesomeMe","Icon","📦 Legacy \u0026 Inactive Projects"],"sub_categories":["Front End","Save"],"readme":"# Titanic\n\nA collection of animated icons + javascript library.\n\n![Preview](/docs/images/animated-icons-preview.gif)\n\n**[Preview all icons](https://rawgit.com/icons8/titanic/master/demo/index.html)**\n\n## Installation\n\nYou can install it either via CDN or npm.\n\n### CDN\n\nInsert this string to your HTML head:\n```html\n\u003cscript src=\"https://cdn.rawgit.com/icons8/titanic/master/dist/js/titanic.min.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"https://cdnjs.cloudflare.com/ajax/libs/bodymovin/4.5.9/bodymovin.min.js\"\u003e\u003c/script\u003e\n```\nAnd initialize it before the body closes:\n\n```html\n\u003cscript\u003e\n    var titanic = new Titanic();\n\u003c/script\u003e\n```\nThis way, you can add icons anywhere in your HTML using this tag:\n```html\n\u003cdiv class='titanic titanic-chat'\u003e\u003c/div\u003e\n```\nWhere chat can be any of these:\n* caps\n* chat\n* checkbox\n* expand\n* cheap\n* expensive\n* idea\n* mailbox\n* mic\n* no-mic\n* online\n* pause\n* power\n* shopping\n* smile\n* stop\n* unlock\n* zoom\n\n### Hosting your images\n\nIf you'd like to host your images on your server instead of rawgit, pass the base URL with the init() function:\n```javascript\ntitanic.begin('/my/base/directory/');\n```\nThen, if you have a div with id=\"chat\", Titanic will search for icons in /my/base/directory/chat.json.\n\n## npm\n\n```\nnpm install titanic-icons --save\n```\n\n## API\n\n* ```titanic.isInitialized()``` -- just true/false flag\n\n* ```titanic.items``` -- list of titanic items\n* ```titanic.items[index].on(), titanic.items[index].off(), titanic.items[index].play()``` -- play animations of the titanic item by index\n* ```titanic.on(token), titanic.off(token), titanic.play(token)``` -- play animations of the titanic item by token (name)\n\n## Example\n\n```html\n\u003chead\u003e\n    \u003c!--Inserting the scripts once for the whole page--\u003e\n    \u003cscript src=\"https://cdn.rawgit.com/icons8/titanic/master/dist/js/titanic.min.js\"\u003e\u003c/script\u003e\n    \u003cscript src=\"https://cdnjs.cloudflare.com/ajax/libs/bodymovin/4.5.9/bodymovin.min.js\"\u003e\u003c/script\u003e\n\u003c/head\u003e\n\u003cbody\u003e\n    \u003c!--Inserting an icon--\u003e\n    \u003cdiv class='titanic titanic-checkbox'\u003e\u003c/div\u003e\n\n    \u003c!--Initializing--\u003e\n    \u003cscript\u003e\n        var titanic = new Titanic({\n          hover: true, // auto animated on hover (default true)\n          click: true  // auto animated on click/tap (default false)\n        });\n    \u003c/script\u003e\n\n    \u003c!--Clicking turns this icon on--\u003e\n    \u003cbutton onclick=\"titanic.on(getElementById('checkbox').value)\"\u003eOn\u003c/button\u003e\n\u003c/body\u003e\n```\n\n## Credits\nJavaScript is basically [bodymovin](https://github.com/bodymovin/bodymovin) plus few lines of my code. It's a solid library with an awesome name. Thank you, guys.\n\nIcons are created by [Margarita Ivanchikova](https://dribbble.com/imargarita) from [Icons8](https://icons8.com/). She has many more awesome animations in her portfolio.\n\nThe code rewritten by [Denis Alexanov](https://github.com/dhilt), my teacher and guru. Thank you!\n\nProject is produced by Icons8, author of the famous icon library, [IconPharm](https://iconpharm.com), and [Sleek Logos](https://sleeklogos.design).\n\nThe code is created by Icons8 \n\n![Magritte](/docs/images/magritte.gif)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ficons8%2Ftitanic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ficons8%2Ftitanic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ficons8%2Ftitanic/lists"}