Skip to content

Latest commit

 

History

History
23 lines (18 loc) · 454 Bytes

README.md

File metadata and controls

23 lines (18 loc) · 454 Bytes

Nakai

Getting started

gleam add nakai
import nakai
import nakai/html.{type Node}
import nakai/attr.{type Attr}

pub fn header(attrs: List(Attr), text: String) -> Node {
  let attrs = [attr.class("text-xl weight-400"), ..attrs]
  html.h1_text(attrs, text)
}

pub fn app() -> String {
  header([], "Hello, from Nakai!")
  |> nakai.to_string()
}