|elm-version||0.18.0 <= v < 0.19.0|
|Committed At||2017-04-18 15:50:53 UTC|
TypedSvg is an Elm package that makes it more pleasant to work with SVG (Scalable Vector Graphics). It is based on nphollon's original work.
TypedSvg 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.
TL;DR this package will change
TypedSvgcontains SVG elements like
TypedSvg.Corecontains basic building blocks like
attribute, as well as the
TypedSvg.Typescontains all of the types, as well as some length type helpers like
TypedSvg.Attributescontains typed attributes like
TypedSvg.Filterscontains filter elements.
TypedSvg.Filters.Attributescontains filter element attributes.
TypedSvg.Eventscontains SVG event attributes like
import Html exposing (Html) import Color import TypedSvg exposing (svg, circle) import TypedSvg.Attributes exposing (viewBox, cx, cy, r, fill, strokeWidth, stroke) import TypedSvg.Types exposing (px) type Msg = NoOp type alias Model = Int view : Model -> Html Msg view model = svg [ viewBox 0 0 800 600 ] [ circle [ cx (px 150) , cy (px 150) , r (px 30) , fill Color.black , strokeWidth (px 2) , stroke <| Color.rgba 90 60 60 0.5 ]  ]
TypedSvg works well in conjunction with
folkertdev/svg-path-dsl if you need a typed path domain-specific language.