Module

Specular.Dom.Element

Package
purescript-specular
Repository
restaumatic/purescript-specular

#el' Source

el' :: forall r a. TagName -> Array Prop -> RWidget r a -> RWidget r (Tuple Node a)

#el Source

el :: forall r a. TagName -> Array Prop -> RWidget r a -> RWidget r a

#el_ Source

el_ :: forall r a. TagName -> RWidget r a -> RWidget r a

#text Source

text :: forall r. String -> RWidget r Unit

#dynText Source

dynText :: forall r. Dynamic String -> RWidget r Unit

#attrs Source

attrs :: Attrs -> Prop

Attach static attributes to the node.

#attrsD Source

attrsD :: Dynamic Attrs -> Prop

Attach a dynamically-changing map of attributes to the node.

The set of attributes must be distinct from the attributes set by other uses of attrs or attrsD on the same element.

#attrsWhen Source

#attrsUnless Source

#onClick Source

#preventDefault Source

#stopPropagation Source

#valueD Source

valueD :: Dynamic String -> Prop

Attach dynamically-changing value property to an input element. The value can still be changed by user interaction.

Only works on <input> and <select> elements.

#bindValueOnChange Source

bindValueOnChange :: Ref String -> Prop

Set up a two-way binding between the value of an <input> element, and the given Ref.

The Ref will be updated on change event, i.e. at the end of user inteaction, not on every keystroke.

Only works on input elements.

#bindValueOnInput Source

bindValueOnInput :: Ref String -> Prop

Set up a two-way binding between the value of an <input> element, and the given Ref.

The Ref will be updated on input event, i.e. on every keystroke.

Only works on input elements.

#checkedD Source

checkedD :: Dynamic Boolean -> Prop

Attach dynamically-changing checked property to an input element. The value can still be changed by user interaction.

Only works on input type="checkbox" and type="radio" elements.

#bindChecked Source

bindChecked :: Ref Boolean -> Prop

Set up a two-way binding between the checked of an <input> element, and the given Ref.

Only works on input type="checkbox" and type="radio" elements.

#indeterminateD Source

indeterminateD :: Dynamic Boolean -> Prop

Attach dynamically-changing indeterminate property to a checkbox element.

Only works on input type="checkbox" elements.

#ClassName Source

#class_ Source

class_ :: ClassName -> Prop

Attach a single CSS class to the element.

Note: if using this property:

  • the class attribute must not be used,
  • the provided class name must be distinct from class names used in other properties from this module.

#classes Source

classes :: Array ClassName -> Prop

Attach an array of CSS classes to the element.

Note: if using this property:

  • the class attribute must not be used,
  • the provided class names must be distinct from class names used in other properties from this module.

#classesD Source

classesD :: Dynamic (Array ClassName) -> Prop

Attach a dynamically-changing array of CSS classes to the element.

Note: if using this property:

  • the class attribute must not be used,
  • the provided class names must be distinct from class names used in other properties from this module.

#classWhenD Source

classWhenD :: Dynamic Boolean -> ClassName -> Prop

Conditionally attach a CSS class to the element. The class will be present if the condition is true.

Note: if using this property:

  • the class attribute must not be used,
  • the provided class name must be distinct from class names used in other properties from this module.

#classUnlessD Source

classUnlessD :: Dynamic Boolean -> ClassName -> Prop

classUnlessD cond = classWhenD (not cond)

Re-exports from Specular.Dom.Builder.Class

#rawHtml Source

rawHtml :: forall m. MonadDomBuilder m => String -> m Unit