Module

Pha.Html.Core

Package
purescript-pha
Repository
gbagan/purescript-pha

#Html Source

data Html :: Type -> Type

Instances

#Prop Source

data Prop :: Type -> Type

#h Source

h :: forall msg. String -> Array (Prop msg) -> Array (Html msg) -> Html msg

#keyed Source

keyed :: forall msg. String -> Array (Prop msg) -> Array (Tuple String (Html msg)) -> Html msg

#text Source

text :: forall msg. String -> Html msg

#attr Source

attr :: forall msg. String -> String -> Prop msg

adds or changes an attribute

#style Source

style :: forall msg. String -> String -> Prop msg

#on_ Source

on_ :: forall msg. String -> (Event -> Maybe msg) -> Prop msg

#class_ Source

class_ :: forall msg. String -> Prop msg

adds a class name to the vnode

#class' Source

class' :: forall msg. String -> Boolean -> Prop msg

adds a class name to the vnode if the second argument is true

#lazy Source

lazy :: forall msg a. (a -> Html msg) -> a -> Html msg

#when Source

when :: forall msg. Boolean -> (Unit -> Html msg) -> Html msg
when true f = f unit
when false f = text ""

#fromMaybe Source

fromMaybe :: forall msg. Maybe (Html msg) -> Html msg
maybeN (Just vdom) = vdom
maybeN Nothing = text ""

#maybe Source

maybe :: forall msg a. Maybe a -> (a -> Html msg) -> Html msg

#unsafeOnWithEffect Source

unsafeOnWithEffect :: forall msg. String -> EventHandler msg -> Prop msg

#EventHandler Source

type EventHandler msg = Event -> Effect (Maybe msg)

Re-exports from Web.Event.Event

#Event Source

data Event :: Type

Basic type for all DOM events.