Module

Halogen.HTML

Package
purescript-halogen
Repository
slamdata/purescript-halogen

This module re-exports the types for the HTML DSL, and values for all supported HTML elements.

#PlainHTML Source

type PlainHTML = HTML Void Void

A type useful for a chunk of HTML with no slot-embedding or query-raising.

Often a polymorphic usage of HTML is good enough for this, but sometimes it's useful to have a type like this (and accompanying coercion) when doing things like creating components that accept a chunk of HTML as part of their configuration.

#fromPlainHTML Source

fromPlainHTML :: forall i p. PlainHTML -> HTML p i

Relaxes the type of PlainHTML to make it compatible with all HTML.

#slot Source

slot :: forall g o i p m f. p -> Component HTML g i o m -> i -> (o -> Maybe (f Unit)) -> ParentHTML f g p m

Defines a slot for a child component. Takes:

  • the slot "address" value
  • the component for the slot
  • the input value to pass to the component
  • a function mapping outputs from the component to a query in the parent

#slot' Source

slot' :: forall m o i p' p g' g f. ChildPath g g' p p' -> p -> Component HTML g i o m -> i -> (o -> Maybe (f Unit)) -> ParentHTML f g' p' m

Defines a slot for a child component when a parent has multiple types of child component. Takes:

  • the ChildPath for this particular child component type
  • the slot "address" value
  • the component for the slot
  • the input value to pass to the component
  • a function mapping outputs from the component to a query in the parent

Re-exports from Halogen.HTML.Core

#PropName Source

newtype PropName value

A type-safe wrapper for property names.

The phantom type value describes the type of value which this property requires.

Constructors

Instances

#HTML Source

newtype HTML p i

Constructors

Instances

#ClassName Source

newtype ClassName

A wrapper for strings which are used as CSS classes.

Constructors

Instances

#AttrName Source

newtype AttrName

A type-safe wrapper for attribute names.

Constructors

Instances

#text Source

text :: forall i p. String -> HTML p i

Constructs a text node HTML value.

#handler Source

handler :: forall i. EventType -> (Event -> Maybe i) -> Prop i

Create an event handler.

Re-exports from Halogen.HTML.Elements

#Node Source

type Node r p i = Array (IProp r i) -> Array (HTML p i) -> HTML p i

An HTML element that admits children.

#Leaf Source

type Leaf r p i = Array (IProp r i) -> HTML p i

An HTML element that does not admit children.

#withKeys_ Source

withKeys_ :: forall i p. (Array (HTML p i) -> HTML p i) -> Array (Tuple String (HTML p i)) -> HTML p i

#withKeys Source

withKeys :: forall i p r. (Array (IProp r i) -> Array (HTML p i) -> HTML p i) -> Array (IProp r i) -> Array (Tuple String (HTML p i)) -> HTML p i

#wbr Source

wbr :: forall i p. Leaf HTMLwbr p i

#video_ Source

video_ :: forall i p. Array (HTML p i) -> HTML p i

#video Source

video :: forall i p. Node HTMLvideo p i

#var_ Source

var_ :: forall i p. Array (HTML p i) -> HTML p i

#var Source

var :: forall i p. Node HTMLvar p i

#ul_ Source

ul_ :: forall i p. Array (HTML p i) -> HTML p i

#ul Source

ul :: forall i p. Node HTMLul p i

#u_ Source

u_ :: forall i p. Array (HTML p i) -> HTML p i

#u Source

u :: forall i p. Node HTMLu p i

#track Source

track :: forall i p. Leaf HTMLtrack p i

#tr_ Source

tr_ :: forall i p. Array (HTML p i) -> HTML p i

#tr Source

tr :: forall i p. Node HTMLtr p i

#title_ Source

title_ :: forall i p. Array (HTML p i) -> HTML p i

#title Source

title :: forall i p. Node HTMLtitle p i

#time_ Source

time_ :: forall i p. Array (HTML p i) -> HTML p i

#time Source

time :: forall i p. Node HTMLtime p i

#thead_ Source

thead_ :: forall i p. Array (HTML p i) -> HTML p i

#thead Source

thead :: forall i p. Node HTMLthead p i

#th_ Source

th_ :: forall i p. Array (HTML p i) -> HTML p i

#th Source

th :: forall i p. Node HTMLth p i

#tfoot_ Source

tfoot_ :: forall i p. Array (HTML p i) -> HTML p i

#tfoot Source

tfoot :: forall i p. Node HTMLtfoot p i

#textarea Source

textarea :: forall i p. Leaf HTMLtextarea p i

#td_ Source

td_ :: forall i p. Array (HTML p i) -> HTML p i

#td Source

td :: forall i p. Node HTMLtd p i

#tbody_ Source

tbody_ :: forall i p. Array (HTML p i) -> HTML p i

#tbody Source

tbody :: forall i p. Node HTMLtbody p i

#table_ Source

table_ :: forall i p. Array (HTML p i) -> HTML p i

#table Source

table :: forall i p. Node HTMLtable p i

#sup_ Source

sup_ :: forall i p. Array (HTML p i) -> HTML p i

#sup Source

sup :: forall i p. Node HTMLsup p i

#summary_ Source

summary_ :: forall i p. Array (HTML p i) -> HTML p i

#summary Source

summary :: forall i p. Node HTMLsummary p i

#sub_ Source

sub_ :: forall i p. Array (HTML p i) -> HTML p i

#sub Source

sub :: forall i p. Node HTMLsub p i

#style_ Source

style_ :: forall i p. Array (HTML p i) -> HTML p i

#style Source

style :: forall i p. Node HTMLstyle p i

#strong_ Source

strong_ :: forall i p. Array (HTML p i) -> HTML p i

#strong Source

strong :: forall i p. Node HTMLstrong p i

#span_ Source

span_ :: forall i p. Array (HTML p i) -> HTML p i

#span Source

span :: forall i p. Node HTMLspan p i

#source Source

source :: forall i p. Leaf HTMLsource p i

#small_ Source

small_ :: forall i p. Array (HTML p i) -> HTML p i

#small Source

small :: forall i p. Node HTMLsmall p i

#select_ Source

select_ :: forall i p. Array (HTML p i) -> HTML p i

#select Source

select :: forall i p. Node HTMLselect p i

#section_ Source

section_ :: forall i p. Array (HTML p i) -> HTML p i

#section Source

section :: forall i p. Node HTMLsection p i

#script_ Source

script_ :: forall i p. Array (HTML p i) -> HTML p i

#script Source

script :: forall i p. Node HTMLscript p i

#samp_ Source

samp_ :: forall i p. Array (HTML p i) -> HTML p i

#samp Source

samp :: forall i p. Node HTMLsamp p i

#ruby_ Source

ruby_ :: forall i p. Array (HTML p i) -> HTML p i

#ruby Source

ruby :: forall i p. Node HTMLruby p i

#rt_ Source

rt_ :: forall i p. Array (HTML p i) -> HTML p i

#rt Source

rt :: forall i p. Node HTMLrt p i

#rp_ Source

rp_ :: forall i p. Array (HTML p i) -> HTML p i

#rp Source

rp :: forall i p. Node HTMLrp p i

#q_ Source

q_ :: forall i p. Array (HTML p i) -> HTML p i

#q Source

q :: forall i p. Node HTMLq p i

#progress_ Source

progress_ :: forall i p. Array (HTML p i) -> HTML p i

#progress Source

progress :: forall i p. Node HTMLprogress p i

#pre_ Source

pre_ :: forall i p. Array (HTML p i) -> HTML p i

#pre Source

pre :: forall i p. Node HTMLpre p i

#param Source

param :: forall i p. Leaf HTMLparam p i

#p_ Source

p_ :: forall i p. Array (HTML p i) -> HTML p i

#p Source

p :: forall i p. Node HTMLp p i

#output_ Source

output_ :: forall i p. Array (HTML p i) -> HTML p i

#output Source

output :: forall i p. Node HTMLoutput p i

#option_ Source

option_ :: forall i p. Array (HTML p i) -> HTML p i

#option Source

option :: forall i p. Node HTMLoption p i

#optgroup_ Source

optgroup_ :: forall i p. Array (HTML p i) -> HTML p i

#optgroup Source

optgroup :: forall i p. Node HTMLoptgroup p i

#ol_ Source

ol_ :: forall i p. Array (HTML p i) -> HTML p i

#ol Source

ol :: forall i p. Node HTMLol p i

#object_ Source

object_ :: forall i p. Array (HTML p i) -> HTML p i

#object Source

object :: forall i p. Node HTMLobject p i

#noscript_ Source

noscript_ :: forall i p. Array (HTML p i) -> HTML p i

#noscript Source

noscript :: forall i p. Node HTMLnoscript p i

#nav_ Source

nav_ :: forall i p. Array (HTML p i) -> HTML p i

#nav Source

nav :: forall i p. Node HTMLnav p i

#meter_ Source

meter_ :: forall i p. Array (HTML p i) -> HTML p i

#meter Source

meter :: forall i p. Node HTMLmeter p i

#meta Source

meta :: forall i p. Leaf HTMLmeta p i

#menuitem_ Source

menuitem_ :: forall i p. Array (HTML p i) -> HTML p i

#menuitem Source

menuitem :: forall i p. Node HTMLmenuitem p i

#menu_ Source

menu_ :: forall i p. Array (HTML p i) -> HTML p i

#menu Source

menu :: forall i p. Node HTMLmenu p i

#mark_ Source

mark_ :: forall i p. Array (HTML p i) -> HTML p i

#mark Source

mark :: forall i p. Node HTMLmark p i

#map_ Source

map_ :: forall i p. Array (HTML p i) -> HTML p i

#map Source

map :: forall i p. Node HTMLmap p i

#main_ Source

main_ :: forall i p. Array (HTML p i) -> HTML p i

#main Source

main :: forall i p. Node HTMLmain p i

#li_ Source

li_ :: forall i p. Array (HTML p i) -> HTML p i

#li Source

li :: forall i p. Node HTMLli p i

#legend_ Source

legend_ :: forall i p. Array (HTML p i) -> HTML p i

#legend Source

legend :: forall i p. Node HTMLlegend p i

#label_ Source

label_ :: forall i p. Array (HTML p i) -> HTML p i

#label Source

label :: forall i p. Node HTMLlabel p i

#keyedNS Source

keyedNS :: forall i p r. Namespace -> ElemName -> Array (IProp r i) -> Array (Tuple String (HTML p i)) -> HTML p i

Creates a Namespaced HTML element that expects indexed properties, with keyed children.

#keyed Source

keyed :: forall i p r. ElemName -> Array (IProp r i) -> Array (Tuple String (HTML p i)) -> HTML p i

Creates an HTML element that expects indexed properties, with keyed children.

#kbd_ Source

kbd_ :: forall i p. Array (HTML p i) -> HTML p i

#kbd Source

kbd :: forall i p. Node HTMLkbd p i

#ins_ Source

ins_ :: forall i p. Array (HTML p i) -> HTML p i

#ins Source

ins :: forall i p. Node HTMLins p i

#input Source

input :: forall i p. Leaf HTMLinput p i

#img Source

img :: forall i p. Leaf HTMLimg p i

#iframe Source

iframe :: forall i p. Leaf HTMLiframe p i

#i_ Source

i_ :: forall i p. Array (HTML p i) -> HTML p i

#i Source

i :: forall i p. Node HTMLi p i

#html_ Source

html_ :: forall i p. Array (HTML p i) -> HTML p i

#html Source

html :: forall i p. Node HTMLhtml p i

#hr_ Source

hr_ :: forall i p. HTML p i

#hr Source

hr :: forall i p. Leaf HTMLhr p i

#header_ Source

header_ :: forall i p. Array (HTML p i) -> HTML p i

#header Source

header :: forall i p. Node HTMLheader p i

#head_ Source

head_ :: forall i p. Array (HTML p i) -> HTML p i

#head Source

head :: forall i p. Node HTMLhead p i

#h6_ Source

h6_ :: forall i p. Array (HTML p i) -> HTML p i

#h6 Source

h6 :: forall i p. Node HTMLh6 p i

#h5_ Source

h5_ :: forall i p. Array (HTML p i) -> HTML p i

#h5 Source

h5 :: forall i p. Node HTMLh5 p i

#h4_ Source

h4_ :: forall i p. Array (HTML p i) -> HTML p i

#h4 Source

h4 :: forall i p. Node HTMLh4 p i

#h3_ Source

h3_ :: forall i p. Array (HTML p i) -> HTML p i

#h3 Source

h3 :: forall i p. Node HTMLh3 p i

#h2_ Source

h2_ :: forall i p. Array (HTML p i) -> HTML p i

#h2 Source

h2 :: forall i p. Node HTMLh2 p i

#h1_ Source

h1_ :: forall i p. Array (HTML p i) -> HTML p i

#h1 Source

h1 :: forall i p. Node HTMLh1 p i

#form_ Source

form_ :: forall i p. Array (HTML p i) -> HTML p i

#form Source

form :: forall i p. Node HTMLform p i

#footer_ Source

footer_ :: forall i p. Array (HTML p i) -> HTML p i

#footer Source

footer :: forall i p. Node HTMLfooter p i

#figure_ Source

figure_ :: forall i p. Array (HTML p i) -> HTML p i

#figure Source

figure :: forall i p. Node HTMLfigure p i

#figcaption_ Source

figcaption_ :: forall i p. Array (HTML p i) -> HTML p i

#figcaption Source

figcaption :: forall i p. Node HTMLfigcaption p i

#fieldset_ Source

fieldset_ :: forall i p. Array (HTML p i) -> HTML p i

#fieldset Source

fieldset :: forall i p. Node HTMLfieldset p i

#embed_ Source

embed_ :: forall i p. Array (HTML p i) -> HTML p i

#embed Source

embed :: forall i p. Node HTMLembed p i

#em_ Source

em_ :: forall i p. Array (HTML p i) -> HTML p i

#em Source

em :: forall i p. Node HTMLem p i

#elementNS Source

elementNS :: forall i p r. Namespace -> ElemName -> Array (IProp r i) -> Array (HTML p i) -> HTML p i

Creates a Namespaced HTML element that expects indexed properties.

#element Source

element :: forall i p r. ElemName -> Array (IProp r i) -> Array (HTML p i) -> HTML p i

Creates an HTML element that expects indexed properties.

#dt_ Source

dt_ :: forall i p. Array (HTML p i) -> HTML p i

#dt Source

dt :: forall i p. Node (HTMLdt) p i

#dl_ Source

dl_ :: forall i p. Array (HTML p i) -> HTML p i

#dl Source

dl :: forall i p. Node HTMLdl p i

#div_ Source

div_ :: forall i p. Array (HTML p i) -> HTML p i

#div Source

div :: forall i p. Node HTMLdiv p i

#dialog_ Source

dialog_ :: forall i p. Array (HTML p i) -> HTML p i

#dialog Source

dialog :: forall i p. Node HTMLdialog p i

#dfn_ Source

dfn_ :: forall i p. Array (HTML p i) -> HTML p i

#dfn Source

dfn :: forall i p. Node HTMLdfn p i

#details_ Source

details_ :: forall i p. Array (HTML p i) -> HTML p i

#details Source

details :: forall i p. Node HTMLdetails p i

#del_ Source

del_ :: forall i p. Array (HTML p i) -> HTML p i

#del Source

del :: forall i p. Node HTMLdel p i

#dd_ Source

dd_ :: forall i p. Array (HTML p i) -> HTML p i

#dd Source

dd :: forall i p. Node HTMLdd p i

#datalist_ Source

datalist_ :: forall i p. Array (HTML p i) -> HTML p i

#datalist Source

datalist :: forall i p. Node HTMLdatalist p i

#command Source

command :: forall i p. Leaf HTMLcommand p i

#colgroup_ Source

colgroup_ :: forall i p. Array (HTML p i) -> HTML p i

#colgroup Source

colgroup :: forall i p. Node HTMLcolgroup p i

#col Source

col :: forall i p. Leaf HTMLcol p i

#code_ Source

code_ :: forall i p. Array (HTML p i) -> HTML p i

#code Source

code :: forall i p. Node HTMLcode p i

#cite_ Source

cite_ :: forall i p. Array (HTML p i) -> HTML p i

#cite Source

cite :: forall i p. Node HTMLcite p i

#caption_ Source

caption_ :: forall i p. Array (HTML p i) -> HTML p i

#caption Source

caption :: forall i p. Node HTMLcaption p i

#canvas Source

canvas :: forall i p. Leaf HTMLcanvas p i

#button_ Source

button_ :: forall i p. Array (HTML p i) -> HTML p i

#button Source

button :: forall i p. Node HTMLbutton p i

#br_ Source

br_ :: forall i p. HTML p i

#br Source

br :: forall i p. Leaf HTMLbr p i

#body_ Source

body_ :: forall i p. Array (HTML p i) -> HTML p i

#body Source

body :: forall i p. Node HTMLbody p i

#blockquote_ Source

blockquote_ :: forall i p. Array (HTML p i) -> HTML p i

#blockquote Source

blockquote :: forall i p. Node HTMLblockquote p i

#bdo_ Source

bdo_ :: forall i p. Array (HTML p i) -> HTML p i

#bdo Source

bdo :: forall i p. Node HTMLbdo p i

#bdi_ Source

bdi_ :: forall i p. Array (HTML p i) -> HTML p i

#bdi Source

bdi :: forall i p. Node HTMLbdi p i

#base Source

base :: forall i p. Leaf HTMLbase p i

#b_ Source

b_ :: forall i p. Array (HTML p i) -> HTML p i

#b Source

b :: forall i p. Node HTMLb p i

#audio_ Source

audio_ :: forall i p. Array (HTML p i) -> HTML p i

#audio Source

audio :: forall i p. Node HTMLaudio p i

#aside_ Source

aside_ :: forall i p. Array (HTML p i) -> HTML p i

#aside Source

aside :: forall i p. Node HTMLaside p i

#article_ Source

article_ :: forall i p. Array (HTML p i) -> HTML p i

#article Source

article :: forall i p. Node HTMLarticle p i

#area Source

area :: forall i p. Leaf HTMLarea p i

#address_ Source

address_ :: forall i p. Array (HTML p i) -> HTML p i

#address Source

address :: forall i p. Node HTMLaddress p i

#abbr_ Source

abbr_ :: forall i p. Array (HTML p i) -> HTML p i

#abbr Source

abbr :: forall i p. Node HTMLabbr p i

#a_ Source

a_ :: forall i p. Array (HTML p i) -> HTML p i

#a Source

a :: forall i p. Node HTMLa p i

Re-exports from Halogen.HTML.Properties

#IProp Source

newtype IProp (r :: Row Type) i

The phantom row r can be thought of as a context which is synthesized in the course of constructing a refined HTML expression.

Instances

#prop Source

prop :: forall i r value. IsProp value => PropName value -> value -> IProp r i

Creates an indexed HTML property.

#attrNS Source

attrNS :: forall i r. Namespace -> AttrName -> String -> IProp r i

Creates an indexed HTML attribute.

#attr Source

attr :: forall i r. AttrName -> String -> IProp r i

Creates an indexed HTML attribute.