{"id":17866210,"url":"https://github.com/xt0rted/heroicons-tag-helper","last_synced_at":"2025-03-21T05:30:50.161Z","repository":{"id":36964825,"uuid":"305820805","full_name":"xt0rted/heroicons-tag-helper","owner":"xt0rted","description":"ASP.NET tag helper for adding Heroicons to your razor views","archived":false,"fork":false,"pushed_at":"2024-04-29T07:54:21.000Z","size":675,"stargazers_count":13,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-05-01T21:50:23.189Z","etag":null,"topics":["hacktoberfest","heroicons","taghelper","taghelpers","tailwindcss"],"latest_commit_sha":null,"homepage":"https://www.nuget.org/packages/HeroiconsTagHelper","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/xt0rted.png","metadata":{"funding":{"github":"xt0rted","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null},"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2020-10-20T20:04:47.000Z","updated_at":"2024-05-06T08:37:21.852Z","dependencies_parsed_at":"2023-11-06T08:26:14.615Z","dependency_job_id":"be8b315c-95f3-480f-ac04-77cb7becf253","html_url":"https://github.com/xt0rted/heroicons-tag-helper","commit_stats":{"total_commits":298,"total_committers":5,"mean_commits":59.6,"dds":"0.43624161073825507","last_synced_commit":"669c67470ffbd5a601109b84958e440d7a5a40cd"},"previous_names":[],"tags_count":30,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xt0rted%2Fheroicons-tag-helper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xt0rted%2Fheroicons-tag-helper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xt0rted%2Fheroicons-tag-helper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xt0rted%2Fheroicons-tag-helper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xt0rted","download_url":"https://codeload.github.com/xt0rted/heroicons-tag-helper/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244745659,"owners_count":20503044,"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":["hacktoberfest","heroicons","taghelper","taghelpers","tailwindcss"],"created_at":"2024-10-28T09:29:10.312Z","updated_at":"2025-03-21T05:30:49.860Z","avatar_url":"https://github.com/xt0rted.png","language":"C#","funding_links":["https://github.com/sponsors/xt0rted"],"categories":[],"sub_categories":[],"readme":"# \u003cimg src=\"assets/logo.svg\" align=\"left\" height=\"45\"\u003e heroicons-tag-helper\n\n[![CI build status](https://github.com/xt0rted/heroicons-tag-helper/workflows/CI/badge.svg)](https://github.com/xt0rted/heroicons-tag-helper/actions?query=workflow%3ACI)\n[![NuGet Package](https://img.shields.io/nuget/v/HeroiconsTagHelper?logo=nuget)](https://www.nuget.org/packages/HeroiconsTagHelper)\n[![GitHub Package Registry](https://img.shields.io/badge/github-package_registry-yellow?logo=nuget)](https://nuget.pkg.github.com/xt0rted/index.json)\n[![Project license](https://img.shields.io/github/license/xt0rted/heroicons-tag-helper)](LICENSE)\n\nASP.NET tag helper for adding [Heroicons](https://heroicons.com/) to your razor views.\n\n## Installation\n\n\u003e [!NOTE]\n\u003e This package's version is aligned with the [heroicons NPM package](https://www.npmjs.com/package/heroicons) so you always know which version you're using.\n\n```terminal\ndotnet add package HeroiconsTagHelper\n```\n\nCI builds can be downloaded from the [packages page](https://github.com/xt0rted/heroicons-tag-helper/packages/473445) or the GitHub feed.\nThey're also available as build artifacts on every PR.\n\n## Setup\n\nIn your `_ViewImports.cshtml` add:\n\n```html\n@addTagHelper *, HeroiconsTagHelper\n```\n\nIn your `Startup.cs` add:\n\n```csharp\npublic void ConfigureServices(IServiceCollection services)\n{\n    services.AddHeroicons(Configuration);\n}\n```\n\nIn your `appsettings.json` add:\n\n```json\n{\n  \"Heroicons\": {\n    \"IncludeComments\": true,\n    \"SetAccessibilityAttributes\": true,\n    \"SetFocusableAttribute\": true\n  }\n}\n```\n\n## Settings\n\nName | Default Value | Description\n:-- | :-- | :--\n`IncludeComments` | `false` | Add an html comment before the svg tag with the style and name of the icon to help make development/debugging easier.\n`SetAccessibilityAttributes` | `false` | Adds various accessibility attributes based on the default state of the tag.\n`SetFocusableAttribute` | `false` | Adds the `focusable` attribute set to `false` to prevent the icon from receiving focus in Internet Explorer and Edge Legacy.\n\n### SetAccessibilityAttributes\n\nIf `aria-label` or `aria-labeledby` are set then the icon is being used as an image so [`role=\"img\"`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/Role_Img#svg_and_roleimg) will be added to the svg tag, otherwise [`aria-hidden=\"true\"`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-hidden_attribute) will be added.\n\n\u003e **Note**: If the element already contains an `aria-hidden` or `role` attribute then it will not be modified.\n\n## Usage\n\nThere are two versions of the tag helper which are used to pick between the `outline` and `solid` icon styles.\n\n```html\n\u003cheroicon-outline icon=\"Sun\" class=\"h-6 w-6 text-orange-500\" /\u003e\n```\n\nwill output\n\n```xml\n\u003csvg class=\"h-6 w-6 text-orange-500\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\"\u003e\n    \u003cpath stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z\" /\u003e\n\u003c/svg\u003e\n```\n\n```html\n\u003cheroicon-solid icon=\"Sun\" class=\"h-6 w-6 text-orange-500\" /\u003e\n```\n\nwill output\n\n```xml\n\u003csvg class=\"h-6 w-6 text-orange-500\" fill=\"currentColor\" viewBox=\"0 0 20 20\"\u003e\n    \u003cpath fill-rule=\"evenodd\" d=\"M10 2a1 1 0 011 1v1a1 1 0 11-2 0V3a1 1 0 011-1zm4 8a4 4 0 11-8 0 4 4 0 018 0zm-.464 4.95l.707.707a1 1 0 001.414-1.414l-.707-.707a1 1 0 00-1.414 1.414zm2.12-10.607a1 1 0 010 1.414l-.706.707a1 1 0 11-1.414-1.414l.707-.707a1 1 0 011.414 0zM17 11a1 1 0 100-2h-1a1 1 0 100 2h1zm-7 4a1 1 0 011 1v1a1 1 0 11-2 0v-1a1 1 0 011-1zM5.05 6.464A1 1 0 106.465 5.05l-.708-.707a1 1 0 00-1.414 1.414l.707.707zm1.414 8.486l-.707.707a1 1 0 01-1.414-1.414l.707-.707a1 1 0 011.414 1.414zM4 11a1 1 0 100-2H3a1 1 0 000 2h1z\" clip-rule=\"evenodd\" /\u003e\n\u003c/svg\u003e\n```\n\n## Development\n\nThis project uses the [run-script](https://github.com/xt0rted/dotnet-run-script) dotnet tool to manage its build and test scripts.\nTo use this you'll need to run `dotnet tool install` and then `dotnet r` to see the available commands or look at the `scripts` section in the [global.json](global.json).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxt0rted%2Fheroicons-tag-helper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxt0rted%2Fheroicons-tag-helper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxt0rted%2Fheroicons-tag-helper/lists"}