icidasset / svg-gren

SVG package based on icidasset/html-gren

Home Page:https://packages.gren-lang.org/package/icidasset/svg-gren/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

A SVG package for Gren, uses the HTML package as the foundation.

import Transmutable.Html
import Transmutable.Html.VirtualDom
import Transmutable.Svg exposing (Svg, svg)
import Transmutable.Svg.Attributes as A

someSvg : Svg msg -- Just an alias for `Transmutable.Html.Html msg`
someSvg =
  svg
      [ A.fill "none"
      , A.viewBox "0 0 201 233"
      ]
      []

string =
  Transmutable.Html.toString someSvg

virtualDom =
  Transmutable.Html.VirtualDom.toVirtualDom someSvg

You can convert this SVG/HTML to VirtualDom using this package.

About

SVG package based on icidasset/html-gren

https://packages.gren-lang.org/package/icidasset/svg-gren/

License:BSD 3-Clause "New" or "Revised" License