miso
Copyright(C) 2016-2025 David M. Johnson
LicenseBSD3-style (see the file LICENSE)
MaintainerDavid M. Johnson <code@dmj.io>
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010

Miso.Property

Description

Construct custom properties on DOM elements

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

Smart constructors

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 -> Integer -> Attribute action Source #

Set field to Integer value

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

Set field to Double value

prop :: ToJSON a => MisoString -> a -> Attribute action Source #

prop k v is an attribute that will set the attribute k of the DOM node associated with the vnode to v.

keyProp :: ToKey key => key -> Attribute action Source #

Set Key on VNode.

key_ :: ToKey key => key -> Attribute action Source #

Synonym for keyProp Allows a user to specify a Key inside of an [Attribute action]