{"id":25757611,"url":"https://github.com/ekondur/razorkit","last_synced_at":"2025-10-04T09:07:40.007Z","repository":{"id":266543921,"uuid":"861425786","full_name":"ekondur/RazorKit","owner":"ekondur","description":"RazorKit is a collection of lightweight, fluent-style Razor HTML helpers that make it easy for developers to integrate popular JavaScript libraries into their ASP.NET applications.","archived":false,"fork":false,"pushed_at":"2025-08-18T19:54:14.000Z","size":4449,"stargazers_count":10,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-08-29T22:30:41.436Z","etag":null,"topics":["chartjs","csharp","datatables","htmlhelper","javascript","razor"],"latest_commit_sha":null,"homepage":"https://ekondur.github.io/RazorKit/","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/ekondur.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","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,"zenodo":null},"funding":{"github":["ekondur"]}},"created_at":"2024-09-22T21:14:11.000Z","updated_at":"2025-08-28T14:46:18.000Z","dependencies_parsed_at":"2024-12-29T00:18:07.568Z","dependency_job_id":"39761135-4207-4679-b921-ceb403c260dd","html_url":"https://github.com/ekondur/RazorKit","commit_stats":null,"previous_names":["ekondur/razorkit"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/ekondur/RazorKit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ekondur%2FRazorKit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ekondur%2FRazorKit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ekondur%2FRazorKit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ekondur%2FRazorKit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ekondur","download_url":"https://codeload.github.com/ekondur/RazorKit/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ekondur%2FRazorKit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272778168,"owners_count":24991500,"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","status":"online","status_checked_at":"2025-08-29T02:00:10.610Z","response_time":87,"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":["chartjs","csharp","datatables","htmlhelper","javascript","razor"],"created_at":"2025-02-26T16:31:17.779Z","updated_at":"2025-10-04T09:07:40.002Z","avatar_url":"https://github.com/ekondur.png","language":"C#","funding_links":["https://github.com/sponsors/ekondur"],"categories":[],"sub_categories":[],"readme":"# Welcome to RazorKit\n\nRazorKit is a collection of lightweight, fluent-style Razor HTML helpers that make it easy for developers to integrate popular JavaScript libraries into their ASP.NET applications. \nWith RazorKit, you can quickly implement features from libraries like [Chart.js](https://ekondur.github.io/RazorKit/chartjs/) and [DataTables](https://ekondur.github.io/RazorKit/datatables/), without the hassle of writing complex JavaScript or HTML code manually.\n\n## Using DataTables\n\nInstall the [RazorKit.DataTables](https://www.nuget.org/packages/RazorKit.DataTables/) package from nuget.\n\n```\nPM\u003e Install-Package RazorKit.DataTables\n```\n\nAdd related scripts and style links and implement. [Reference:](https://datatables.net/)\n\n\n```csharp\n@using RazorKit\n\n@(Html.DataTable\u003cPerson\u003e()\n.Columns(c =\u003e\n{\n    c.Field(f =\u003e f.Id).Visible(false);\n    c.Field(f =\u003e f.Name).Title(\"Name\");\n})\n.DataSource(ds =\u003e ds\n    .URL(Url.Action(\"GetDataResult\"))\n    .Method(\"POST\")\n    .Naming(Convention.CamelCase))\n.ServerSide(true)\n.Render())\n```\n\n```csharp\nusing RazorKit.DataTables;\n\n[HttpPost]\npublic JsonResult GetDataResult(DataRequest request)\n{\n    var result = ctx.People.ToDataResult(request);\n    return Json(result);\n}\n``` \n\n## Using ChartJs\n\nInstall the [RazorKit.ChartJs](https://www.nuget.org/packages/RazorKit.ChartJs/) package from nuget.\n\n```\nPM\u003e Install-Package RazorKit.ChartJs\n```\n\nAdd related scripts and implement. [Reference:](https://www.chartjs.org/docs/latest/getting-started/)\n\n```csharp\n\u003cscript src=\"https://cdn.jsdelivr.net/npm/chart.js\"\u003e\u003c/script\u003e\n\n@using RazorKit\n\n@(Html.Chart(\"canvasId\")\n    .Data(d =\u003e d\n        .Labels(\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\")\n        .Datasets(ds =\u003e ds\n            .Line()\n            .Label(\"Line Chart\")\n            .Data(65, 59, 80, 81, 56, 55, 40)))\n    .Render())\n```\n\n## Using SweetAlert2\n\nInstall the [RazorKit.SweetAlert2](https://www.nuget.org/packages/RazorKit.SweetAlert2/) package from nuget.\n\n```\nPM\u003e Install-Package RazorKit.SweetAlert2\n```\n\nAdd related scripts and implement. [Reference:](https://sweetalert2.github.io/#download)\n\n```csharp\n\u003cbutton id=\"alertButton\"\u003eShow Alert\u003c/button\u003e\n\n@using RazorKit\n\n@{\n    var alert = \n    Html.Swal()             \n    .Title(\"Good job!\")\n    .Text(\"You clicked the button!\")\n    .Icon(\"question\")\n    .Footer(\"footer of the alert\");\n}\n\n\u003cscript\u003e\n    document.getElementById('alertButton').addEventListener('click', function () {\n        @alert.Fire()\n    });\n\u003c/script\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fekondur%2Frazorkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fekondur%2Frazorkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fekondur%2Frazorkit/lists"}