Définit un champ de saisie de type textarea
Input.new
{ onInput = UpdateComment
, id = "commentaire"
, label = text "Commentaire"
, value = value
}
|> Input.textArea (Just 8)
|> Input.withExtraAttrs [ class "w-full" ]
|> Input.viewDéfinit un champ de saisie décimal
Input.new
{ onInput = UpdateCost
, id = "cost"
, label = text "Coût"
, value = cost
}
|> Input.decimal 0.01
|> Input.view
`Input.decimal 0.01` signifie une précision à deux décimales après la virgule.Définit un champ de saisie personnalisé
Input.new
{ onInput = UpdatePhone
, id = "phone"
, label = text "Numéro de téléphone"
, value = value
}
|> Input.custom "tel"
|> Input.view
Crée un champ de saisie