Module

Transit.Data.Html

Package
purescript-transit
Repository
m-bock/purescript-transit

Data types and functions for building HTML structures.

This module provides a simple, type-safe way to construct HTML nodes and convert them to HTML strings. It's primarily used for generating transition tables and other HTML output.

#Attribute Source

data Attribute

An HTML attribute (name-value pair).

Constructors

Instances

#Node Source

data Node

An HTML node, either an element with a tag name, attributes, and children, or a text node containing raw text.

Constructors

Instances

#attrStyle Source

attrStyle :: String -> Attribute

Creates a style attribute.

#b Source

b :: Array Attribute -> Array Node -> Node

Creates a b (bold) element.

#caption Source

caption :: Array Attribute -> Array Node -> Node

Creates a caption element.

#nodeToHtml Source

nodeToHtml :: Node -> String

Converts an HTML node to its string representation.

#table Source

table :: Array Attribute -> Array Node -> Node

Creates a table element.

#tbody Source

tbody :: Array Attribute -> Array Node -> Node

Creates a tbody element.

#td Source

td :: Array Attribute -> Array Node -> Node

Creates a td (table cell) element.

#text Source

text :: String -> Node

Creates a text node from a string.

#th Source

th :: Array Attribute -> Array Node -> Node

Creates a th (table header) element.

#thead Source

thead :: Array Attribute -> Array Node -> Node

Creates a thead element.

#tr Source

tr :: Array Attribute -> Array Node -> Node

Creates a tr (table row) element.