Module

Halogen.HTML.Core

Package
purescript-halogen
Repository
slamdata/purescript-halogen

#HTML Source

newtype HTML p i

Constructors

Instances

#slot Source

slot :: forall q p. p -> HTML p q

A smart constructor for widget slots in the HTML.

#text Source

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

Constructs a text node HTML value.

#element Source

element :: forall i p. Maybe Namespace -> ElemName -> Array (Prop i) -> Array (HTML p i) -> HTML p i

A smart constructor for HTML elements.

#keyed Source

keyed :: forall i p. Maybe Namespace -> ElemName -> Array (Prop i) -> Array (Tuple String (HTML p i)) -> HTML p i

A smart constructor for HTML elements with keyed children.

#prop Source

prop :: forall i value. IsProp value => PropName value -> value -> Prop i

Create a HTML property.

#attr Source

attr :: forall i. Maybe Namespace -> AttrName -> String -> Prop i

Create a HTML attribute.

#handler Source

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

Create an event handler.

#ref Source

ref :: forall i. (Maybe Element -> Maybe i) -> Prop i

#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

#AttrName Source

newtype AttrName

A type-safe wrapper for attribute names.

Constructors

Instances

#ClassName Source

newtype ClassName

A wrapper for strings which are used as CSS classes.

Constructors

Instances

Re-exports from Halogen.VDom

#Namespace

newtype Namespace

Constructors

  • Namespace String

Instances

  • Newtype Namespace _
  • Eq Namespace
  • Ord Namespace
  • Generic Namespace

#ElemName

newtype ElemName

Constructors

  • ElemName String

Instances

  • Newtype ElemName _
  • Eq ElemName
  • Ord ElemName
  • Generic ElemName

Re-exports from Halogen.VDom.DOM.Prop

#PropValue

data PropValue :: Type

#Prop

data Prop a

Attributes, properties, event handlers, and element lifecycles. Parameterized by the type of handlers outputs.

Constructors

  • Attribute (Maybe Namespace) String String
  • Property String PropValue
  • Handler EventType (Event -> Maybe a)
  • Ref (ElemRef Element -> Maybe a)

Instances

  • Functor Prop