BSD-3-Clause licensed by Jeffrey Rosenbluth
Maintained by [email protected]
This version can be pinned in stack with:lucid-svg-0.6.0.0@sha256:950fd24cd8e357a84e7967abec23616eeb4400c0b291919130ec4138a7b1914f,1105

Module documentation for 0.6.0.0

Used by 2 packages in nightly-2015-12-26(full list with versions):

lucid-svg Hackage

Simple DSL for writing SVG, based on lucid

Example

{-# LANGUAGE OverloadedStrings #-}

import Lucid.Svg
 
svg :: Svg () -> Svg ()
svg content = do
  doctype_
  with (svg11_ content) [width_ "300" , height_ "200"]

contents :: Svg ()
contents = do
  rect_   [width_ "100%", height_ "100%", fill_ "red"]
  circle_ [cx_ "150", cy_ "100", r_ "80", fill_ "green"]
  text_   [x_ "150", y_ "125", font_size_ "60", text_anchor_ "middle", fill_ "white"] "SVG"


main :: IO ()
main = do
  print $ svg contents

SVG