miso-1.8.5.0: A tasty Haskell front-end web framework

Copyright(C) 2016-2018 David M. Johnson
LicenseBSD3-style (see the file LICENSE)
MaintainerDavid M. Johnson <djohnson.m@gmail.com>
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010

Miso.Html.Property

Contents

Description

Construct custom properties on DOM elements

div_ [ prop "id" "foo" ] [ ]
Synopsis

Construction

textProp :: MisoString -> MisoString -> Attribute action Source #

Set field to Text value

stringProp :: MisoString -> String -> Attribute action Source #

Set field to String value

boolProp :: MisoString -> Bool -> Attribute action Source #

Set field to Bool value

intProp :: MisoString -> Int -> Attribute action Source #

Set field to Int value

integerProp :: MisoString -> Int -> Attribute action Source #

Set field to Integer value

doubleProp :: MisoString -> Double -> Attribute action Source #

Set field to Double value

Common attributes

classList_ :: [(MisoString, Bool)] -> Attribute action Source #

Define multiple classes conditionally

div_ [ classList_ [ ("empty", null items) ] [ ]

Inputs

Input Helpers

Input Ranges

Input Text areas

Links and areas

Maps

Embedded Content

Audio and Video

iframes

Ordered lists

Tables

Headers

Data

styleInline_ :: MisoString -> Attribute action Source #

Set "style" property

view m = div_ [ styleInline_ "background-color:red;color:blue;" ] [ "foo" ]

https://developer.mozilla.org/en-US/docs/Web/CSS