Skip to content

A library for working with html with no dependency on the browser

License

Notifications You must be signed in to change notification settings

koka-community/html

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

An experiment for building HTML

Usage

import html/html

fun other-component()
  text("Done!")

fun some-component()
  html
    head
      title
        text("Title of the document")
    body
      span(classes=["red"])
        text("Hello, World!")
      span(classes=["blue"])
        text("Goodbye, World!")
      other-component()

fun main()
  println(some-component().show)

Results in

<html>
  <head>
    <title>
      Title of the document
    </title>
  </head>
  <body>
    <span class="red">
      Hello, World!
    </span>
    <span class="blue">
      Goodbye, World!
    </span>
    Done!
  </body>
</html>

About

A library for working with html with no dependency on the browser

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published