{"id":13561432,"url":"https://github.com/elm-community/typed-svg","last_synced_at":"2025-05-07T06:56:18.211Z","repository":{"id":19295964,"uuid":"85144413","full_name":"elm-community/typed-svg","owner":"elm-community","description":"Typed SVG library written for Elm","archived":false,"fork":false,"pushed_at":"2022-04-26T14:25:54.000Z","size":230,"stargazers_count":59,"open_issues_count":14,"forks_count":16,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-05-03T00:04:13.539Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Elm","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/elm-community.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}},"created_at":"2017-03-16T02:41:14.000Z","updated_at":"2025-02-08T02:13:28.000Z","dependencies_parsed_at":"2022-07-27T00:16:04.171Z","dependency_job_id":null,"html_url":"https://github.com/elm-community/typed-svg","commit_stats":null,"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elm-community%2Ftyped-svg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elm-community%2Ftyped-svg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elm-community%2Ftyped-svg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elm-community%2Ftyped-svg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elm-community","download_url":"https://codeload.github.com/elm-community/typed-svg/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252416508,"owners_count":21744448,"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":[],"created_at":"2024-08-01T13:00:56.587Z","updated_at":"2025-05-07T06:56:18.189Z","avatar_url":"https://github.com/elm-community.png","language":"Elm","funding_links":[],"categories":["Elm"],"sub_categories":[],"readme":"  # TypedSvg\n\nTypedSvg is an Elm package that makes it more pleasant to work with SVG (Scalable Vector Graphics). It is based on [nphollon's](https://github.com/nphollon/typed-svg) original work.\n\n## Status\n\nTypedSvg is a work-in-progress. It intends to replace `elm-lang/svg` with a fully typed and documented equivalent. However, as it stands now, there is still work to be done in covering documentation for the entire (very large) SVG spec, as well as potential re-organization work in how the public modules are presented as an API.\n\nTL;DR this package will change\n\n## Modules\n\n- `TypedSvg` contains SVG elements like `circle` and `rect`.\n- `TypedSvg.Core` contains basic building blocks like `node` and `attribute`, as well as the `Svg` and `Attribute` types.\n- `TypedSvg.Types` contains all of the types, as well as some length type helpers like `px` and `em`.\n- `TypedSvg.Attributes` contains typed attributes like `fill`, `strokeWidth` and `svgBox`\n- `TypedSvg.Filters` contains filter elements.\n- `TypedSvg.Filters.Attributes` contains filter element attributes.\n- `TypedSvg.Events` contains SVG event attributes like `onLoad`, `onClick` and `onMouseOver`.\n\n## Usage\n\n```elm\nimport Color\nimport Html exposing (Html)\nimport TypedSvg exposing (circle, svg)\nimport TypedSvg.Attributes exposing (cx, cy, fill, r, stroke, strokeWidth, viewBox)\nimport TypedSvg.Types exposing (Paint(..), px)\nimport TypedSvg.Core exposing (Svg)\n\n\nmyCircle : Svg msg\nmyCircle =\n    circle\n        [ cx (px 100)\n        , cy (px 100)\n        , r (px 30)\n        , fill \u003c| Paint Color.blue\n        , strokeWidth (px 2)\n        , stroke \u003c| Paint \u003c| Color.rgba 0.8 0 0 0.5\n        ]\n        []\n\nmain : Html msg\nmain =\n    svg [ viewBox 0 0 800 600 ] [ myCircle ]\n```\n\n## Sister Packages\n\nTypedSvg works well in conjunction with `folkertdev/svg-path-dsl` if you need a typed path domain-specific language.\n\n## License\n\nApache 2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felm-community%2Ftyped-svg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felm-community%2Ftyped-svg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felm-community%2Ftyped-svg/lists"}