{"id":19747044,"url":"https://github.com/phphe/mdi-js","last_synced_at":"2026-04-18T05:32:27.974Z","repository":{"id":83554207,"uuid":"500510259","full_name":"phphe/mdi-js","owner":"phphe","description":"Convert Material design icons svg to js and TypeScript.","archived":false,"fork":false,"pushed_at":"2022-06-07T04:48:52.000Z","size":947,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-28T07:58:52.090Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/phphe.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-06-06T16:29:22.000Z","updated_at":"2022-06-06T16:33:38.000Z","dependencies_parsed_at":"2023-07-07T18:45:45.172Z","dependency_job_id":null,"html_url":"https://github.com/phphe/mdi-js","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/phphe/mdi-js","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phphe%2Fmdi-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phphe%2Fmdi-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phphe%2Fmdi-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phphe%2Fmdi-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phphe","download_url":"https://codeload.github.com/phphe/mdi-js/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phphe%2Fmdi-js/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31957557,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T00:39:45.007Z","status":"online","status_checked_at":"2026-04-18T02:00:07.018Z","response_time":103,"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":[],"created_at":"2024-11-12T02:16:45.306Z","updated_at":"2026-04-18T05:32:27.969Z","avatar_url":"https://github.com/phphe.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mdi-js\n\nConvert Material design icons svg to js and TypeScript.\n\n## Type\n\n```ts\nexport interface Icon {\n  attrs: {\n    xmlns: string;\n    viewBox: string;\n    width: string;\n    height: string;\n    [key: string]: string;\n  };\n  html: string;\n}\n```\n\n`attrs` are attributes of svg tag. `html` is the code between svg tag.\n\n## Svg example\n\n```svg\n\u003csvg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\"\u003e\u003cpath d=\"M0 0h24v24H0V0z\" fill=\"none\"/\u003e\u003cpath d=\"M10.01 21.01c0 1.1.89 1.99 1.99 1.99s1.99-.89 1.99-1.99h-3.98zm8.87-4.19V11c0-3.25-2.25-5.97-5.29-6.69v-.72C13.59 2.71 12.88 2 12 2s-1.59.71-1.59 1.59v.72C7.37 5.03 5.12 7.75 5.12 11v5.82L3 18.94V20h18v-1.06l-2.12-2.12zM16 13.01h-3v3h-2v-3H8V11h3V8h2v3h3v2.01z\"/\u003e\u003c/svg\u003e\n```\n\n## Install\n\n```sh\nnpm install mdi-js\n```\n\n## Import\n\nMaterial design icon has 5 styles: filled, outlined, rounded, sharp, two tone. Check: https://fonts.google.com/icons?selected=Material+Icons:arrow_downward\n\nThis library has 6 export points. A default export and 5 style exports. The default export is `filled` style.\n\nAn exported icon name is in camel case: `mdiNameStyle`. For `filled` style, suffix is omitted: `mdiName`.\n\n```ts\n// Icon is the type of all icons\nimport { Icon } from \"mdi-js\";\nimport { Icon } from \"mdi-js/filled\";\n// imort a icon\nimport { mdiFace } from \"mdi-js\";\nimport { mdiFace } from \"mdi-js/filled\";\nimport { mdiFaceOutlined } from \"mdi-js/outlined\";\nimport { mdiFaceRound } from \"mdi-js/round\";\nimport { mdiFaceSharp } from \"mdi-js/sharp\";\nimport { mdiFaceTwotone } from \"mdi-js/twotone\";\n```\n\n## Usage\n\n### Vue Example\n\n```vue\n\u003ctemplate\u003e\n  \u003csvg v-bind=\"icon.attrs\" v-html=\"icon.html\"\u003e\u003c/svg\u003e\n\u003c/template\u003e\n\n\u003cscript lang=\"tsx\"\u003e\nimport { mdiFace } from \"mdi-svg-converted/filled\";\nexport default {\n  data() {\n    return { icon: mdiFace };\n  },\n};\n\u003c/script\u003e\n```\n\n## Related\n\n- [Search icon quickly in google fonts](https://fonts.google.com/icons?selected=Material+Icons:arrow_downward\u0026icon.style=Filled)\n- [MaterialDesignIcons.com](https://materialdesignicons.com/)\n- [https://github.com/Templarian/MaterialDesign](https://github.com/Templarian/MaterialDesign)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphphe%2Fmdi-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphphe%2Fmdi-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphphe%2Fmdi-js/lists"}