Module

Pux.Form

Package
purescript-pux-form
Repository
b123400/purescript-pux-form

#FieldF Source

data FieldF s e a

#Field Source

type Field s e = Exists (FieldF s e)

#Fields Source

type Fields s e = CatList (Field s e)

#field Source

field :: forall a e s. Render a => Lens' s a -> Fields s e

Wraps a lens into a field, without HTML label

#fieldWrapped Source

fieldWrapped :: forall a e s. Render a => Lens' s a -> (HTML e -> HTML e) -> Fields s e

Create a field with a lens and a function that wraps around the <input> element. For example typical form would wrap <input> with a <label> tag. See fieldWithLabel for example.

#fieldWithLabel Source

fieldWithLabel :: forall a e s. Render a => Lens' s a -> HTML e -> Fields s e

Create a field with a lens and a HTML element. The element will be added in front of the <input> element, inside the <label> tag.

#fieldWithText Source

fieldWithText :: forall a e s. Render a => Lens' s a -> String -> Fields s e

Create a field with a lens and a String that is used as the label.

#(.|) Source

Operator alias for Pux.Form.fieldWrapped (left-associative / precedence 5)

#(./) Source

Operator alias for Pux.Form.fieldWithLabel (left-associative / precedence 5)

#(.\) Source

Operator alias for Pux.Form.fieldWithText (left-associative / precedence 5)

#form Source

form :: forall e s. s -> Fields s e -> (s -> e) -> HTML e

Turns fields into the form HTML.

Re-exports from Pux.Form.Render