Skip to content

Latest commit

 

History

History
36 lines (28 loc) · 755 Bytes

README.md

File metadata and controls

36 lines (28 loc) · 755 Bytes

Roc HTML

A library to create HTML in Roc.

Example

This Roc code:

Html.html [] [
    Html.body [] [
        Html.h1 [] [Html.text "Roc"],
        Html.p [] [
            Html.text "You should really check out ",
            Html.a [Attributes.href "https://roc-lang.org/"] [Html.text "Roc"],
            Html.text "!",
        ]
    ]
] |> Html.render

Returns this HTML (give or take a little formatting):

<!doctype html>
<html>
  <body>
    <h1>Roc</h1>
    <p>You should really check out <a href="https://roc-lang.org/">Roc</a>!</p>
  </body>
</html>

Licence

This repository is released under the UPL licence and was mostly written by Brian Carroll. Thanks, Brian!