{"id":15816837,"url":"https://github.com/anranruye/viewerjsblazor","last_synced_at":"2026-03-05T20:03:21.320Z","repository":{"id":144112283,"uuid":"458868857","full_name":"anranruye/ViewerJsBlazor","owner":"anranruye","description":"A blazor wrapper for Viewer.js JavaScript image viewer library","archived":false,"fork":false,"pushed_at":"2022-03-20T15:38:56.000Z","size":15,"stargazers_count":5,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-20T21:41:22.615Z","etag":null,"topics":["blazor","component","image","image-viewer","razor","viewer","viewerjs"],"latest_commit_sha":null,"homepage":"","language":"C#","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/anranruye.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-02-13T16:43:15.000Z","updated_at":"2024-12-24T13:53:37.000Z","dependencies_parsed_at":null,"dependency_job_id":"f6d47d4d-2ec8-40d0-9eea-8839245b21d2","html_url":"https://github.com/anranruye/ViewerJsBlazor","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/anranruye/ViewerJsBlazor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anranruye%2FViewerJsBlazor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anranruye%2FViewerJsBlazor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anranruye%2FViewerJsBlazor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anranruye%2FViewerJsBlazor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anranruye","download_url":"https://codeload.github.com/anranruye/ViewerJsBlazor/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anranruye%2FViewerJsBlazor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30148035,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-05T16:58:46.102Z","status":"ssl_error","status_checked_at":"2026-03-05T16:58:45.706Z","response_time":93,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["blazor","component","image","image-viewer","razor","viewer","viewerjs"],"created_at":"2024-10-05T05:20:42.691Z","updated_at":"2026-03-05T20:03:21.305Z","avatar_url":"https://github.com/anranruye.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ViewerJsBlazor\n\nA blazor wrapper for [Viewer.js](https://github.com/fengyuanchen/viewerjs) JavaScript image viewer library.\n\n## Installation\n\nBy Package Manager:\n```\nInstall-Package ViewerJsBlazor -Version 1.0.0\n```\n\nBy CLI:\n```\ndotnet add package ViewerJsBlazor --version 1.0.0\n```\n\nBy PackageReference:\n```\n\u003cPackageReference Include=\"ViewerJsBlazor\" Version=\"1.0.0\" /\u003e\n```\n\n## Usage\n\nIn your `_Host.cshtml` or `index.html` file:\n```html\n\u003clink href=\"https://cdnjs.cloudflare.com/ajax/libs/viewerjs/1.10.4/viewer.min.css\" rel=\"stylesheet\"\u003e\n\u003cscript src=\"https://cdnjs.cloudflare.com/ajax/libs/viewerjs/1.10.4/viewer.min.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"_content/ViewerJsBlazor/interop.js\"\u003e\u003c/script\u003e\n```\n\nIn a razor page:\n```html\n@using ViewerJsBlazor\n\n@*image group*@\n\u003cViewerJsImageGroup ElementType=\"ul\" Options=\"options\"\u003e\n    @for (var i = 1; i \u003c= 9; i++)\n    {\n        \u003cli\u003e\n            \u003cViewerJsImage data-original=\"imagePath\" src=\"thumbnailPath\" alt=\"alt message\" /\u003e\n        \u003c/li\u003e\n    }\n\u003c/ViewerJsImageGroup\u003e\n\n@*single image*@\n\u003cViewerJsImage data-original=\"imagePath\" src=\"thumbnailPath\" alt=\"alt message\" Options=\"options\" /\u003e\n\n@code{\n  object options = new { url = \"data-original\" };\n}\n\n```\n\n## API\n\n### `ViewerJsImageGroup`:\n\nThe `ViewerJsImageGroup` component will generate a html element as the container of a group of images.\n\n### Properties\nrazor attributes:\n\nName | type | description\n\n`ElementType` | `string` | the type of the html element generated by this component, default value is `\"div\"`\n\n`Options` | `object` | the options of the viewer, you can use an object of anonymous type or a dictionary, see https://github.com/fengyuanchen/viewerjs#options to learn available options\n\nAll unmatched attributes will added to the generated html element as html attributes.\n\n### Methods\n\n`void Refresh()` | destory and recreate the viewer\n\n`Task InvokeMethod(string methodName, params object[] paramters)` | invoke a method of the js viewer instance, see https://github.com/fengyuanchen/viewerjs#methods to learn available methods\n\n### `ViewerJsImage`:\n\nThe `ViewerJsImage` component will generate an `\u003cimg /\u003e` element to display an image.\n\n### Properties\nrazor attributes:\n\nName | type | description\n\n`Options` | `object` | the options of the viewer, you can use an object of anonymous type or a dictionary, see https://github.com/fengyuanchen/viewerjs#options to learn available options\n\nAll unmatched attributes will added to the generated `\u003cimg /\u003e` element as html attributes.\n\n### Methods\n\n`void Refresh()` | destory and recreate the viewer\n\n`Task InvokeMethod(string methodName, params object[] paramters)` | invoke a method of the js viewer instance, see https://github.com/fengyuanchen/viewerjs#methods to learn available methods\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanranruye%2Fviewerjsblazor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanranruye%2Fviewerjsblazor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanranruye%2Fviewerjsblazor/lists"}