Module

Grain.Markup

Re-exports from Grain.Markup.Element

#wbr

#video

#var

#ul

#u

u :: VNode

#track

#tr

#time

#thead

#th

#tfoot

#textarea

#td

#tbody

#table

#sup

#summary

#sub

#strong

#span

#source

#small

#select

#section

#samp

#s

s :: VNode

#ruby

#rt

#rp

#q

q :: VNode

#progress

#pre

#param

#p

p :: VNode

#output

#option

#optgroup

#ol

#object

#nav

#meter

#menu

#math

#mark

#main_

#li

#legend

#label

#kbd

#ins

#input

#img

#iframe

#i

i :: VNode

#hr

#header

#h6

#h5

#h4

#h3

#h2

#h1

#form

#footer

#figure

#figcaption

#fieldset

#embed

#em

#dt

#dl

#div

#dfn

#details

#del

#dd

#datalist

#colgroup

#col

#code

#cite

#caption

#canvas

#button

#br

#blockquote

#bdo

#bdi

#b

b :: VNode

#audio

#aside

#article

#address

#abbr

#a

a :: VNode

Re-exports from Grain.Markup.Handler

#onWheel

#onWaiting

#onVolumeChange

#onToggle

#onTimeUpdate

#onSuspend

#onSubmit

#onStalled

#onSelect

#onSeeking

#onSeeked

#onScroll

#onReset

#onRateChange

#onProgress

#onPointerUp

#onPointerOver

#onPointerOut

#onPointerMove

#onPointerLeave

#onPointerEnter

#onPointerDown

#onPointerCancel

#onPlaying

#onPlay

#onPause

#onMouseUp

#onMouseOver

#onMouseOut

#onMouseMove

#onMouseLeave

#onMouseEnter

#onMouseDown

#onLoadedMetadata

#onLoadedData

#onLoadStart

#onLoad

#onKeyUp

#onKeyPress

#onKeyDown

#onInvalid

#onInput

#onFocus

#onError

#onEnded

#onEmptied

#onDurationChange

#onDrop

#onDragStart

#onDragOver

#onDragLeave

#onDragEnter

#onDragEnd

#onDrag

#onDoubleClick

#onCueChange

#onContextMenu

#onClick

#onChange

#onCancel

#onCanPlayThrough

#onCanPlay

#onBlur

#onAbort

Re-exports from Grain.Markup.Prop

#wrap

#width

width :: Int -> VNode -> VNode

#value

#useMap

#type_

#title

#target

#tabIndex

#style

#step

#start

start :: Int -> VNode -> VNode

#srclang

#srcdoc

#src

#spellcheck

#size

size :: Int -> VNode -> VNode

#shape

#selected

#scope

#sandbox

#rows

rows :: Int -> VNode -> VNode

#rowSpan

#reversed

#required

#rel

#readOnly

#preload

#poster

#placeholder

#ping

#pattern

#noValidate

#name

#multiple

#minLength

#min

#method

#media

#maxLength

#max

#loop

#list

#lang

#kind_

#isMap

#id

id :: String -> VNode -> VNode

#htmlFor

#hreflang

#href

#hidden

#height

#headers

#formAction

#enctype

#dropzone

#draggable

#download

#disabled

#dir

#defaultValue

#default

#dateTime

#coords

#controls

#contentEditable

#cols

cols :: Int -> VNode -> VNode

#colSpan

#classNames

#checked

#autoplay

#autofocus

#autocomplete

#alt

#action

#accessKey

#acceptCharset

#accept

Re-exports from Grain.UI

#text

text :: String -> VNode

Create a VNode of text.

#prop

prop :: String -> String -> VNode -> VNode

Add a property.

#kids

kids :: Array VNode -> VNode -> VNode

Add children.

#key

key :: String -> VNode -> VNode

Add a key to a VNode.

#handle

handle :: String -> (Event -> Effect Unit) -> VNode -> VNode

Bind an event handler.

#fingerprint

fingerprint :: String -> VNode -> VNode

Add a fingerprint to check equality of a VNode.

If it is same as previous rendered element's one, rendering will be skipped.

#element

element :: String -> VNode

Create a VNode of specified tag element.

#didUpdate

didUpdate :: (Element -> Effect Unit) -> VNode -> VNode

Bind didUpdate lifecycle.

#didDelete

didDelete :: (Element -> Effect Unit) -> VNode -> VNode

Bind didDelete lifecycle.

#didCreate

didCreate :: (Element -> Effect Unit) -> VNode -> VNode

Bind didCreate lifecycle.

#css

css :: String -> VNode -> VNode

Define styles with CSS string.

It generates a hash string as class name from CSS string, and the generated class name is used automatically.

justDiv :: VNode
justDiv =
  H.div # H.css styles

styles :: String
styles =
  """
  .& {
    width: 100px;
    height: 100px;
  }
  .&:hover {
    width: 100px;
    height: 100px;
  }
  .&:hover .selected {
    color: blue;
  }
  """

& in the CSS string is replaced with the generated class name, and output it as stylesheet.

Like this:

.gz66dqm {
  width: 100px;
  height: 100px;
}
.gz66dqm:hover {
  width: 100px;
  height: 100px;
}
.gz66dqm:hover .selected {
  color: blue;
}

#component

component :: Render VNode -> VNode

Create a VNode of component.

#className

Modules