{"id":22886476,"url":"https://github.com/indaco/templiconoir","last_synced_at":"2025-10-14T17:28:53.018Z","repository":{"id":267144735,"uuid":"898474079","full_name":"indaco/templiconoir","owner":"indaco","description":"The Iconoir set as Go Templ components.","archived":false,"fork":false,"pushed_at":"2025-08-07T13:54:57.000Z","size":188,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-07T15:37:44.135Z","etag":null,"topics":["components","go","golang","iconoir","iconoir-icons","icons","templ"],"latest_commit_sha":null,"homepage":"","language":"Go","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/indaco.png","metadata":{"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":"2024-12-04T13:11:01.000Z","updated_at":"2025-08-07T13:53:48.000Z","dependencies_parsed_at":"2025-02-01T10:34:15.127Z","dependency_job_id":null,"html_url":"https://github.com/indaco/templiconoir","commit_stats":null,"previous_names":["indaco/templiconoir"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/indaco/templiconoir","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/indaco%2Ftempliconoir","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/indaco%2Ftempliconoir/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/indaco%2Ftempliconoir/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/indaco%2Ftempliconoir/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/indaco","download_url":"https://codeload.github.com/indaco/templiconoir/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/indaco%2Ftempliconoir/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279020076,"owners_count":26086806,"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-10-14T02:00:06.444Z","response_time":60,"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":["components","go","golang","iconoir","iconoir-icons","icons","templ"],"created_at":"2024-12-13T20:18:55.532Z","updated_at":"2025-10-14T17:28:53.013Z","avatar_url":"https://github.com/indaco.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\" style=\"font-size: 2.5rem;\"\u003e\n  templiconoir\n\u003c/h1\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/indaco/templiconoir/actions/workflows/ci.yaml\" target=\"_blank\"\u003e\n    \u003cimg src=\"https://github.com/indaco/templiconoir/actions/workflows/ci.yaml/badge.svg\" alt=\"CI\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://codecov.io/gh/indaco/templiconoir\"\u003e\n    \u003cimg src=\"https://codecov.io/gh/indaco/templiconoir/branch/main/graph/badge.svg\" alt=\"Code coverage\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://goreportcard.com/report/github.com/indaco/templiconoir/\" target=\"_blank\"\u003e\n    \u003cimg src=\"https://goreportcard.com/badge/github.com/indaco/templiconoir\" alt=\"go report card\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://badge.fury.io/gh/indaco%2Ftempliconoir\"\u003e\n    \u003cimg src=\"https://badge.fury.io/gh/indaco%2Ftempliconoir.svg\" alt=\"GitHub version\" height=\"18\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://pkg.go.dev/github.com/indaco/templiconoir/\" target=\"_blank\"\u003e\n      \u003cimg src=\"https://pkg.go.dev/badge/github.com/indaco/templiconoir/.svg\" alt=\"go reference\" /\u003e\n  \u003c/a\u003e\n   \u003ca href=\"https://github.com/indaco/templiconoir/blob/main/LICENSE\" target=\"_blank\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/license-mit-blue?style=flat-square\u0026logo=none\" alt=\"license\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://www.jetify.com/devbox/docs/contributor-quickstart/\"\u003e\n    \u003cimg src=\"https://www.jetify.com/img/devbox/shield_moon.svg\" alt=\"Built with Devbox\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\nThis package provides the [Iconoir](https://iconoir.com) set (_v7.10.1_) as reusable, type-safe go [templ](https://github.com/a-h/templ) components.\n\nThe icons dataset is dynamically fetched from the [Iconify](https://github.com/iconify/icon-sets) repository.\n\n## Features\n\n- **Lazy Loading**: Icons are loaded on demand at runtime, reducing memory usage and improving performance.\n- **Customizable**: Easily adjust size, color, stroke-width, and add attributes with a simple, chainable API.\n- **Memory Efficient**: Avoids preloading large datasets, reducing memory overhead.\n- **Local Caching**: Speeds up icon with efficient local caching.\n\n## Installation\n\nInstall the package using `go get`:\n\n```bash\ngo get github.com/indaco/templiconoir@latest\n```\n\n## Icon Naming Convention\n\nWe categorize Iconoir based on their style (_Outline_, _Solid_). This is reflected in the naming convention for the components:\n\n**1. Outline Icons**\n\n- Default style with a size of _24px_.\n- Example: `iconoir.Chromecast`, `iconoir.CheckCircle`.\n\n**2. Solid Icons**\n\n- Style is explicitly \"solid\" with a size of _24px_.\n- Example: `iconoir.CheckCircleSolid`, `iconoir.ChatMinusInSolid`.\n\nIcons are named in _PascalCase_ for consistency and ease of use. Size and style are embedded in the names to differentiate icons visually and programmatically.\n\n## Usage\n\n### Rendering Icons\n\nTo use the icons in your templ project, call the `Render()` method on the desired icon component:\n\n```templ\npackage pages\n\nimport iconoir \"github.com/indaco/templiconoir\"\n\ntempl DemoPage() {\n    @iconoir.Chromecast.Render()            // Outline 24px\n    @iconoir.CheckCircleSolid.Render() // Solid 24px\n}\n```\n\n### Customizing Icons\n\nThe `Config` builder pattern allows for fluent and efficient customization of icons. Chain multiple methods to configure properties like size, color, and attributes, then call Render() to generate the final icon as a templ component.\n\n#### 1. SetSize()\n\nUse the `SetSize()` method to set a custom size for the icon in pixels:\n\n```templ\npackage pages\n\nimport iconoir \"github.com/indaco/templiconoir\"\n\ntempl CustomSizePage() {\n    // Set custom size\n    @iconoir.CheckCircleSolid.Config().SetSize(32).Render()\n}\n```\n\n#### 2. SetColor()\n\nUse the `SetColor()` method to modify the fill color for the icons:\n\n```templ\npackage pages\n\nimport iconoir \"github.com/indaco/templiconoir\"\n\ntempl CustomFillColor() {\n    // Customize fill color\n   @iconoir.Chromecast.Config().SetColor(\"#2dd4bf\").Render()\n}\n```\n\n#### 3. SetStrokeWidth()\n\nUse the `SetStrokeWidth()` method to modify the stroke-width for the icons:\n\n```templ\npackage pages\n\nimport iconoir \"github.com/indaco/templiconoir\"\n\ntempl CustomStrokeWidthColor() {\n    // Customize stroke.width\n   @iconoir.Swimming.Config().\n       SetStrokeWidth(\"2\").\n       Render()\n}\n```\n\n#### 4. SetAttrs()\n\nYou can also use the `SetAttrs()` method to add custom attributes to the icons, such as _aria-hidden_, _focusable_, or custom CSS classes:\n\n```templ\npackage pages\n\nimport iconoir \"github.com/indaco/templiconoir\"\n\ntempl CustomIconPage() {\n    // Add attributes to an icon\n    @iconoir.ConfigureIcon(iconoir.Swimming).\n        SetAttrs(templ.Attributes{\n            \"aria-hidden\": \"true\",\n            \"class\":       \"custom-icon\",\n        }).\n        Render()\n}\n```\n\n## Contributing\n\nContributions are welcome! Feel free to open an issue or submit a pull request.\n\n### Development Environment Setup\n\nTo set up a development environment for this repository, you can use [devbox](https://www.jetify.com/devbox) along with the provided `devbox.json` configuration file.\n\n1. Install devbox by following the instructions in the [devbox documentation](https://www.jetify.com/devbox/docs/installing_devbox/).\n2. Clone this repository to your local machine.\n3. Navigate to the root directory of the cloned repository.\n4. Run `devbox install` to install all packages mentioned in the `devbox.json` file.\n5. Run `devbox shell --pure` to start a new shell with access to the environment.\n6. Once the devbox environment is set up, you can start developing, testing, and contributing to the repository.\n\n### Running Tasks\n\nThis project provides both a `Makefile` and a `Taskfile` for running various tasks. You can use either `make` or `task` to execute the tasks, depending on your preference.\n\nTo view all available tasks, run:\n\n- **Makefile**: `make help`\n- **Taskfile**: `task --list-all`\n\nAvailable tasks:\n\n```bash\nbuild                   # Generate the Go icon definitions based on parsed data/heroicons_cache.json file.\ndemo:                   # Run the demo server.\ntest                    # Run go tests.\ntest/coverage:          # Run go tests and use go tool cover.\n```\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](./LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Findaco%2Ftempliconoir","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Findaco%2Ftempliconoir","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Findaco%2Ftempliconoir/lists"}