Module

Halogen.HTML.Properties

A closed signature of type-indexed (refined) HTML properties; these can be used to ensure correctness by construction, and then erased into the standard unrefined versions.

#IProp

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.

Constructors

Instances

#prop

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

Creates an indexed HTML property.

#attr

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

Creates an indexed HTML attribute.

#attrNS

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

Creates an indexed HTML attribute.

#ref

ref :: forall r i. RefLabel -> IProp r i

The ref property allows an input to be raised once a HTMLElement has been created or destroyed in the DOM for the element that the property is attached to.

#expand

expand :: forall lt gt a i. Union lt a gt => IProp lt i -> IProp gt i

Every IProp lt i can be cast to some IProp gt i as long as lt is a subset of gt.

#alt

alt :: forall r i. String -> IProp (alt :: String | r) i

#charset

charset :: forall r i. String -> IProp (charset :: String | r) i

#class_

class_ :: forall r i. ClassName -> IProp (class :: String | r) i

#classes

classes :: forall r i. Array ClassName -> IProp (class :: String | r) i

#cols

cols :: forall r i. Int -> IProp (cols :: Int | r) i

#rows

rows :: forall r i. Int -> IProp (rows :: Int | r) i

#colSpan

colSpan :: forall r i. Int -> IProp (colSpan :: Int | r) i

#rowSpan

rowSpan :: forall r i. Int -> IProp (rowSpan :: Int | r) i

#for

for :: forall r i. String -> IProp (for :: String | r) i

#height

height :: forall r i. CSSPixel -> IProp (height :: CSSPixel | r) i

#width

width :: forall r i. CSSPixel -> IProp (width :: CSSPixel | r) i

#href

href :: forall r i. String -> IProp (href :: String | r) i

#id

id :: forall r i. String -> IProp (id :: String | r) i

#id_

id_ :: forall r i. Warn (Text "`id_` is deprecated. Use `id` instead.") => String -> IProp (id :: String | r) i

#name

name :: forall r i. String -> IProp (name :: String | r) i

#rel

rel :: forall r i. String -> IProp (rel :: String | r) i

#src

src :: forall r i. String -> IProp (src :: String | r) i

#style

style :: forall r i. String -> IProp (style :: String | r) i

Sets the style attribute to the specified string.

... [ style "height: 50px;" ]

If you prefer to use typed CSS for this attribute, you can use the purescript-halogen-css library: https://github.com/purescript-halogen/purescript-halogen-css

#scope

scope :: forall r i. ScopeValue -> IProp (scope :: ScopeValue | r) i

#target

target :: forall r i. String -> IProp (target :: String | r) i

#title

title :: forall r i. String -> IProp (title :: String | r) i

#download

download :: forall r i. String -> IProp (download :: String | r) i

#method

method :: forall r i. FormMethod -> IProp (method :: FormMethod | r) i

#action

action :: forall r i. String -> IProp (action :: String | r) i

#enctype

enctype :: forall r i. MediaType -> IProp (enctype :: MediaType | r) i

#noValidate

noValidate :: forall r i. Boolean -> IProp (noValidate :: Boolean | r) i

#type_

type_ :: forall r i value. IsProp value => value -> IProp (type :: value | r) i

#value

value :: forall r i. String -> IProp (value :: String | r) i

#min

min :: forall r i. Number -> IProp (min :: Number | r) i

#max

max :: forall r i. Number -> IProp (max :: Number | r) i

#step

step :: forall r i. StepValue -> IProp (step :: StepValue | r) i

#disabled

disabled :: forall r i. Boolean -> IProp (disabled :: Boolean | r) i

#enabled

enabled :: forall r i. Boolean -> IProp (disabled :: Boolean | r) i

#required

required :: forall r i. Boolean -> IProp (required :: Boolean | r) i

#readOnly

readOnly :: forall r i. Boolean -> IProp (readOnly :: Boolean | r) i

#spellcheck

spellcheck :: forall r i. Boolean -> IProp (spellcheck :: Boolean | r) i

#checked

checked :: forall r i. Boolean -> IProp (checked :: Boolean | r) i

#selected

selected :: forall r i. Boolean -> IProp (selected :: Boolean | r) i

#selectedIndex

selectedIndex :: forall r i. Int -> IProp (selectedIndex :: Int | r) i

#placeholder

placeholder :: forall r i. String -> IProp (placeholder :: String | r) i

#autocomplete

autocomplete :: forall r i. Boolean -> IProp (autocomplete :: OnOff | r) i

#list

list :: forall r i. String -> IProp (list :: String | r) i

#autofocus

autofocus :: forall r i. Boolean -> IProp (autofocus :: Boolean | r) i

#multiple

multiple :: forall r i. Boolean -> IProp (multiple :: Boolean | r) i

#pattern

pattern :: forall r i. String -> IProp (pattern :: String | r) i

#accept

accept :: forall r i. InputAcceptType -> IProp (accept :: InputAcceptType | r) i

#autoplay

autoplay :: forall r i. Boolean -> IProp (autoplay :: Boolean | r) i

#controls

controls :: forall r i. Boolean -> IProp (controls :: Boolean | r) i

#loop

loop :: forall r i. Boolean -> IProp (loop :: Boolean | r) i

#muted

muted :: forall r i. Boolean -> IProp (muted :: Boolean | r) i

#poster

poster :: forall r i. String -> IProp (poster :: String | r) i

#preload

preload :: forall r i. PreloadValue -> IProp (preload :: PreloadValue | r) i

#draggable

draggable :: forall r i. Boolean -> IProp (draggable :: Boolean | r) i

#tabIndex

tabIndex :: forall r i. Int -> IProp (tabIndex :: Int | r) i

Re-exports from DOM.HTML.Indexed

#CSSPixel

type CSSPixel = Int

Re-exports from DOM.HTML.Indexed.ButtonType

Re-exports from DOM.HTML.Indexed.FormMethod

#FormMethod

data FormMethod

Constructors

Re-exports from DOM.HTML.Indexed.InputAcceptType

Re-exports from DOM.HTML.Indexed.InputType

Re-exports from DOM.HTML.Indexed.MenuType

#MenuType

Re-exports from DOM.HTML.Indexed.MenuitemType

Re-exports from DOM.HTML.Indexed.OnOff

#OnOff

data OnOff

Constructors

Re-exports from DOM.HTML.Indexed.OrderedListType

Re-exports from DOM.HTML.Indexed.PreloadValue

Re-exports from DOM.HTML.Indexed.ScopeValue

Re-exports from DOM.HTML.Indexed.StepValue

#StepValue

data StepValue

Constructors

Modules