choonkeat / html-data / HtmlData.Attributes

See documentation of Html.Attributes

Except, the types here are intentionally fully exposed. The helper functions exists merely to make writing them feel like elm/html et al


type Attribute msg
    = Attribute String String
    | NoAttribute
    | EventListener (EventListener msg)
    | Property String Json.Decode.Value


type EventListener msg
    = On String (Json.Decode.Decoder msg)
    | OnInput (String -> msg)
    | OnCheck (Basics.Bool -> msg)
    | StopPropagationOn String (Json.Decode.Decoder ( msg, Basics.Bool ))
    | PreventDefaultOn String (Json.Decode.Decoder ( msg, Basics.Bool ))
    | Custom String (Json.Decode.Decoder { message : msg, stopPropagation : Basics.Bool, preventDefault : Basics.Bool })

Stores declarations for Html.Events

accept : String -> Attribute msg

acceptCharset : String -> Attribute msg

accesskey : Char -> Attribute msg

action : String -> Attribute msg

align : String -> Attribute msg

alt : String -> Attribute msg

property : String -> Json.Decode.Value -> Attribute msg

attribute : String -> String -> Attribute msg

autocomplete : Basics.Bool -> Attribute msg

autofocus : Basics.Bool -> Attribute msg

autoplay : Basics.Bool -> Attribute msg

checked : Basics.Bool -> Attribute msg

cite : String -> Attribute msg

class : String -> Attribute msg

classList : List ( String, Basics.Bool ) -> Attribute msg

cols : Basics.Int -> Attribute msg

colspan : Basics.Int -> Attribute msg

contenteditable : Basics.Bool -> Attribute msg

contextmenu : String -> Attribute msg

controls : Basics.Bool -> Attribute msg

coords : String -> Attribute msg

datetime : String -> Attribute msg

default : Basics.Bool -> Attribute msg

dir : String -> Attribute msg

disabled : Basics.Bool -> Attribute msg

download : String -> Attribute msg

draggable : String -> Attribute msg

dropzone : String -> Attribute msg

enctype : String -> Attribute msg

for : String -> Attribute msg

form : String -> Attribute msg

headers : String -> Attribute msg

height : Basics.Int -> Attribute msg

hidden : Basics.Bool -> Attribute msg

href : String -> Attribute msg

hreflang : String -> Attribute msg

id : String -> Attribute msg

ismap : Basics.Bool -> Attribute msg

itemprop : String -> Attribute msg

kind : String -> Attribute msg

lang : String -> Attribute msg

list : String -> Attribute msg

loop : Basics.Bool -> Attribute msg

manifest : String -> Attribute msg

map : (a -> msg) -> Attribute a -> Attribute msg

max : String -> Attribute msg

maxlength : Basics.Int -> Attribute msg

media : String -> Attribute msg

method : String -> Attribute msg

min : String -> Attribute msg

minlength : Basics.Int -> Attribute msg

multiple : Basics.Bool -> Attribute msg

name : String -> Attribute msg

novalidate : Basics.Bool -> Attribute msg

pattern : String -> Attribute msg

ping : String -> Attribute msg

placeholder : String -> Attribute msg

poster : String -> Attribute msg

preload : String -> Attribute msg

pubdate : String -> Attribute msg

readonly : Basics.Bool -> Attribute msg

rel : String -> Attribute msg

required : Basics.Bool -> Attribute msg

reversed : Basics.Bool -> Attribute msg

rows : Basics.Int -> Attribute msg

rowspan : Basics.Int -> Attribute msg

sandbox : String -> Attribute msg

scope : String -> Attribute msg

selected : Basics.Bool -> Attribute msg

shape : String -> Attribute msg

size : Basics.Int -> Attribute msg

spellcheck : Basics.Bool -> Attribute msg

src : String -> Attribute msg

srcdoc : String -> Attribute msg

srclang : String -> Attribute msg

start : Basics.Int -> Attribute msg

step : String -> Attribute msg

style : String -> String -> Attribute msg

tabindex : Basics.Int -> Attribute msg

target : String -> Attribute msg

title : String -> Attribute msg

type_ : String -> Attribute msg

usemap : String -> Attribute msg

value : String -> Attribute msg

width : Basics.Int -> Attribute msg

wrap : String -> Attribute msg