austinshenk/elm-w3/3.0.0

NOTE: the latest version is 4.0.0

W3.Html.Attributes

Module that defines all HTML attributes and values

Types

type alias Value a =
Value a

Global Attributes

These Attributes can be assigned to any HTML element as defined by html.spec.whatwg.org/GlobalAttributes

List String
-> Attribute { compatible | accesskey : SupportedAttribute } msg

Follows the attribute definition at html.spec.whatwg.org/accesskey

Value
{ off : SupportedValue
, none : SupportedValue
, on : SupportedValue
, sentences : SupportedValue
, words : SupportedValue
, characters : SupportedValue
}
-> Attribute
{ compatible | autocapitalize : SupportedAttribute }
msg

Follows the attribute definition at html.spec.whatwg.org/autocapitalize

Bool
-> Attribute { compatible | autofocus : SupportedAttribute } msg

Follows the attribute definition at html.spec.whatwg.org/autofocus

List String
-> Attribute { compatible | class : SupportedAttribute } msg

Follows the attribute definition at html.spec.whatwg.org/class

Maybe Bool
-> Attribute
{ compatible | contenteditable : SupportedAttribute }
msg

Follows the attribute definition at html.spec.whatwg.org/contenteditable

String
-> String
-> Attribute { compatible | data_ : SupportedAttribute } msg

Follows the attribute definition at html.spec.whatwg.org/custom data

dir :
Value
{ ltr : SupportedValue
, rtl : SupportedValue
, auto : SupportedValue
}
-> Attribute { compatible | dir : SupportedAttribute } msg

Follows the attribute definition at html.spec.whatwg.org/dir

Maybe Bool
-> Attribute { compatible | draggable : SupportedAttribute } msg

Follows the attribute definition at html.spec.whatwg.org/draggable

Value
{ enter : SupportedValue
, done : SupportedValue
, go : SupportedValue
, next : SupportedValue
, previous : SupportedValue
, search : SupportedValue
, send : SupportedValue
}
-> Attribute
{ compatible | enterkeyhint : SupportedAttribute }
msg

Follows the attribute definition at html.spec.whatwg.org/enterkeyhint

Bool
-> Attribute { compatible | hidden : SupportedAttribute } msg

Follows the attribute definition at html.spec.whatwg.org/hidden

id : String -> Attribute { compatible | id : SupportedAttribute } msg

Follows the attribute definition at html.spec.whatwg.org/id

Value
{ none : SupportedValue
, text : SupportedValue
, tel : SupportedValue
, url : SupportedValue
, email : SupportedValue
, numeric : SupportedValue
, decimal : SupportedValue
, search : SupportedValue
}
-> Attribute { compatible | inputmode : SupportedAttribute } msg

Follows the attribute definition at html.spec.whatwg.org/inputmode

is : String -> Attribute { compatible | is : SupportedAttribute } msg

Follows the attribute definition at html.spec.whatwg.org/is

String
-> Attribute { compatible | itemid : SupportedAttribute } msg

Follows the attribute definition at html.spec.whatwg.org/itemid

List String
-> Attribute { compatible | itemprop : SupportedAttribute } msg

Follows the attribute definition at html.spec.whatwg.org/itemprop

List String
-> Attribute { compatible | itemref : SupportedAttribute } msg

Follows the attribute definition at html.spec.whatwg.org/itemref

Bool
-> Attribute { compatible | itemscope : SupportedAttribute } msg

Follows the attribute definition at html.spec.whatwg.org/itemscope

List String
-> Attribute { compatible | itemtype : SupportedAttribute } msg

Follows the attribute definition at html.spec.whatwg.org/itemtype

String
-> Attribute { compatible | lang : SupportedAttribute } msg

Follows the attribute definition at html.spec.whatwg.org/lang

nonce : Int -> Attribute { compatible | nonce : SupportedAttribute } msg

Follows the attribute definition at html.spec.whatwg.org/nonce

String
-> Attribute { compatible | slot : SupportedAttribute } msg

Follows the attribute definition at html.spec.whatwg.org/slot

Maybe Bool
-> Attribute { compatible | spellcheck : SupportedAttribute } msg

Follows the attribute definition at html.spec.whatwg.org/spellcheck

String
-> Attribute { compatible | style : SupportedAttribute } msg

Follows the attribute definition at html.spec.whatwg.org/style

Int
-> Attribute { compatible | tabindex : SupportedAttribute } msg

Follows the attribute definition at html.spec.whatwg.org/tabindex

String
-> Attribute { compatible | title : SupportedAttribute } msg

Follows the attribute definition at html.spec.whatwg.org/title

Bool
-> Attribute { compatible | translate : SupportedAttribute } msg

Follows the attribute definition at html.spec.whatwg.org/translate

Attributes

These Attributes may be assigned to only specific elements. That is defined on a per-element basis.

String
-> Attribute { compatible | abbr : SupportedAttribute } msg

Follows the attribute definition at html.spec.whatwg.org/abbr

List String
-> Attribute { compatible | accept : SupportedAttribute } msg

Follows the attribute definition at html.spec.whatwg.org/accept

List String
-> Attribute
{ compatible | acceptcharset : SupportedAttribute }
msg

Follows the attribute definition at html.spec.whatwg.org/acceptcharset

String
-> Attribute { compatible | action : SupportedAttribute } msg

Follows the attribute definition at html.spec.whatwg.org/action

String
-> Attribute { compatible | allow : SupportedAttribute } msg

Follows the attribute definition at html.spec.whatwg.org/allow

Bool
-> Attribute
{ compatible | allowfullscreen : SupportedAttribute }
msg

Follows the attribute definition at html.spec.whatwg.org/allowfullscreen

Bool
-> Attribute
{ compatible | allowpaymentrequest : SupportedAttribute }
msg

Follows the attribute definition at html.spec.whatwg.org/allowpaymentrequest

alt : String -> Attribute { compatible | alt : SupportedAttribute } msg
Bool
-> Attribute
{ compatible | autocomplete : SupportedAttribute }
msg

Follows the attribute definition at html.spec.whatwg.org/autocomplete

Bool
-> Attribute { compatible | autoplay : SupportedAttribute } msg

Follows the attribute definition at html.spec.whatwg.org/autoplay,

Bool
-> Attribute { compatible | checked : SupportedAttribute } msg

Follows the attribute definition at html.spec.whatwg.org/checked

String
-> Attribute { compatible | cite : SupportedAttribute } msg
cols : Int -> Attribute { compatible | cols : SupportedAttribute } msg

Follows the attribute definition at html.spec.whatwg.org/cols

Int
-> Attribute { compatible | colspan : SupportedAttribute } msg

Follows the attribute definition at html.spec.whatwg.org/colspan

Bool
-> Attribute { compatible | controls : SupportedAttribute } msg

Follows the attribute definition at html.spec.whatwg.org/controls

List Int
-> Attribute { compatible | coords : SupportedAttribute } msg

Follows the attribute definition at html.spec.whatwg.org/coords

Value
{ anonymous : SupportedValue
, use_credentials : SupportedValue
}
-> Attribute { compatible | crossorigin : SupportedAttribute } msg
String
-> Attribute { compatible | data : SupportedAttribute } msg

Follows the attribute definition at html.spec.whatwg.org/data

String
-> Attribute { compatible | datetime : SupportedAttribute } msg
Value
{ sync : SupportedValue
, async : SupportedValue
, auto : SupportedValue
}
-> Attribute { compatible | decoding : SupportedAttribute } msg

Follows the attribute definition at html.spec.whatwg.org/decoding

Bool
-> Attribute { compatible | default : SupportedAttribute } msg

Follows the attribute definition at html.spec.whatwg.org/default

String
-> Attribute { compatible | dirname : SupportedAttribute } msg

Follows the attribute definition at html.spec.whatwg.org/dirname

Bool
-> Attribute { compatible | disabled : SupportedAttribute } msg
String
-> Attribute { compatible | download : SupportedAttribute } msg

Follows the attribute definition at html.spec.whatwg.org/download

Value
{ form_url_encoded : SupportedValue
, form_data : SupportedValue
, plaintext : SupportedValue
}
-> Attribute { compatible | enctype : SupportedAttribute } msg

Follows the attribute definition at html.spec.whatwg.org/enctype

String
-> Attribute { compatible | files : SupportedAttribute } msg

Follows the attribute definition at html.spec.whatwg.org/files

for : String -> Attribute { compatible | for : SupportedAttribute } msg
String
-> Attribute { compatible | form : SupportedAttribute } msg

Follows the attribute definition at html.spec.whatwg.org/form

String
-> Attribute { compatible | formaction : SupportedAttribute } msg

Follows the attribute definition at html.spec.whatwg.org/formaction

Value
{ form_url_encoded : SupportedValue
, form_data : SupportedValue
, plaintext : SupportedValue
}
-> Attribute { compatible | formenctype : SupportedAttribute } msg

Follows the attribute definition at html.spec.whatwg.org/formenctype

Value
{ get : SupportedValue
, post : SupportedValue
, dialog : SupportedValue
}
-> Attribute { compatible | formmethod : SupportedAttribute } msg

Follows the attribute definition at html.spec.whatwg.org/formmethod

Bool
-> Attribute
{ compatible | formnovalidate : SupportedAttribute }
msg

Follows the attribute definition at html.spec.whatwg.org/formnovalidate

Value
{ blank_ : SupportedValue
, self_ : SupportedValue
, parent_ : SupportedValue
, top_ : SupportedValue
, frame : SupportedValue
}
-> Attribute { compatible | formtarget : SupportedAttribute } msg

Follows the attribute definition at html.spec.whatwg.org/formtarget

List String
-> Attribute { compatible | headers : SupportedAttribute } msg

Follows the attribute definition at html.spec.whatwg.org/headers

height : Int -> Attribute { compatible | height : SupportedAttribute } msg
high : Int -> Attribute { compatible | high : SupportedAttribute } msg

Follows the attribute definition at html.spec.whatwg.org/high

String
-> Attribute { compatible | href : SupportedAttribute } msg

Follows the attribute definition at html.spec.whatwg.org/href

String
-> Attribute { compatible | hreflang : SupportedAttribute } msg

Follows the attribute definition at html.spec.whatwg.org/hreflang

ismap : Bool -> Attribute { compatible | ismap : SupportedAttribute } msg

Follows the attribute definition at html.spec.whatwg.org/ismap

Value
{ subtitles : SupportedValue
, captions : SupportedValue
, description : SupportedValue
, chapters : SupportedValue
, metadata : SupportedValue
}
-> Attribute { compatible | kind : SupportedAttribute } msg

Follows the attribute definition at html.spec.whatwg.org/kind

String
-> Attribute { compatible | label : SupportedAttribute } msg
String
-> Attribute { compatible | list : SupportedAttribute } msg

Follows the attribute definition at html.spec.whatwg.org/list

loop : Bool -> Attribute { compatible | loop : SupportedAttribute } msg

Follows the attribute definition at html.spec.whatwg.org/loop

low : Int -> Attribute { compatible | low : SupportedAttribute } msg

Follows the attribute definition at html.spec.whatwg.org/low

max : Int -> Attribute { compatible | max : SupportedAttribute } msg
Int
-> Attribute { compatible | maxlength : SupportedAttribute } msg
String
-> Attribute { compatible | media : SupportedAttribute } msg

Follows the attribute definition at html.spec.whatwg.org/media

Value
{ get : SupportedValue
, post : SupportedValue
, dialog : SupportedValue
}
-> Attribute { compatible | method : SupportedAttribute } msg

Follows the attribute definition at html.spec.whatwg.org/method

min : Int -> Attribute { compatible | min : SupportedAttribute } msg
Int
-> Attribute { compatible | minlength : SupportedAttribute } msg
Bool
-> Attribute { compatible | multiple : SupportedAttribute } msg
muted : Bool -> Attribute { compatible | muted : SupportedAttribute } msg

Follows the attribute definition at html.spec.whatwg.org/muted

Bool
-> Attribute { compatible | novalidate : SupportedAttribute } msg

Follows the attribute definition at html.spec.whatwg.org/novalidate

open : Bool -> Attribute { compatible | open : SupportedAttribute } msg
Int
-> Attribute { compatible | optimum : SupportedAttribute } msg

Follows the attribute definition at html.spec.whatwg.org/optimum

String
-> Attribute { compatible | pattern : SupportedAttribute } msg

Follows the attribute definition at html.spec.whatwg.org/pattern

List String
-> Attribute { compatible | ping : SupportedAttribute } msg

Follows the attribute definition at html.spec.whatwg.org/ping

String
-> Attribute { compatible | placeholder : SupportedAttribute } msg
Bool
-> Attribute { compatible | playsinline : SupportedAttribute } msg

Follows the attribute definition at html.spec.whatwg.org/playsinline

String
-> Attribute { compatible | poster : SupportedAttribute } msg

Follows the attribute definition at html.spec.whatwg.org/poster

Value
{ none : SupportedValue
, metadata : SupportedValue
, auto : SupportedValue
}
-> Attribute { compatible | preload : SupportedAttribute } msg

Follows the attribute definition at html.spec.whatwg.org/preload

Bool
-> Attribute { compatible | readonly : SupportedAttribute } msg
String
-> Attribute
{ compatible | referrerpolicy : SupportedAttribute }
msg

Follows the attribute definition at html.spec.whatwg.org/referrerpolicy

rel :
List String
-> Attribute { compatible | rel : SupportedAttribute } msg

Follows the attribute definition at html.spec.whatwg.org/rel

Bool
-> Attribute { compatible | required : SupportedAttribute } msg
Bool
-> Attribute { compatible | reversed : SupportedAttribute } msg

Follows the attribute definition at html.spec.whatwg.org/reversed

rows : Int -> Attribute { compatible | rows : SupportedAttribute } msg

Follows the attribute definition at html.spec.whatwg.org/rows

Int
-> Attribute { compatible | rowspan : SupportedAttribute } msg

Follows the attribute definition at html.spec.whatwg.org/rowspan

List
(Value
{ allow_forms : SupportedValue
, allow_modals : SupportedValue
, allow_orientation_lock : SupportedValue
, allow_pointer_lock : SupportedValue
, allow_popups : SupportedValue
, allow_popups_to_escape_sandbox : SupportedValue
, allow_presentation : SupportedValue
, allow_same_origin : SupportedValue
, allow_scripts : SupportedValue
, allow_top_navigation : SupportedValue
, allow_top_navigation_by_user_activation : SupportedValue
}
)
-> Attribute { compatible | sandbox : SupportedAttribute } msg

Follows the attribute definition at html.spec.whatwg.org/sandbox

Value
{ row : SupportedValue
, col : SupportedValue
, rowgroup : SupportedValue
, colgroup : SupportedValue
, auto : SupportedValue
}
-> Attribute { compatible | scope : SupportedAttribute } msg

Follows the attribute definition at html.spec.whatwg.org/scope

Bool
-> Attribute { compatible | selected : SupportedAttribute } msg

Follows the attribute definition at html.spec.whatwg.org/selected

Int
-> Attribute
{ compatible | selectionStart : SupportedAttribute }
msg

Follows the attribute definition at html.spec.whatwg.org/selectionstart

Int
-> Attribute
{ compatible | selectionEnd : SupportedAttribute }
msg

Follows the attribute definition at html.spec.whatwg.org/selectionend

Value
{ forward : SupportedValue
, backward : SupportedValue
, none : SupportedValue
}
-> Attribute
{ compatible | selectionDirection : SupportedAttribute }
msg

Follows the attribute definition at html.spec.whatwg.org/selectiondirection

Value
{ circle : SupportedValue
, circ : SupportedValue
, default_ : SupportedValue
, poly : SupportedValue
, polygon : SupportedValue
, rect : SupportedValue
, rectangle : SupportedValue
}
-> Attribute { compatible | shape : SupportedAttribute } msg

Follows the attribute definition at html.spec.whatwg.org/shape

size : Int -> Attribute { compatible | size : SupportedAttribute } msg
span : Int -> Attribute { compatible | span : SupportedAttribute } msg
start : Int -> Attribute { compatible | start : SupportedAttribute } msg

Follows the attribute definition at html.spec.whatwg.org/start

step : Int -> Attribute { compatible | step : SupportedAttribute } msg

Follows the attribute definition at html.spec.whatwg.org/step

src : String -> Attribute { compatible | src : SupportedAttribute } msg

Follows the attribute definition at html.spec.whatwg.org/src

String
-> Attribute { compatible | srcdoc : SupportedAttribute } msg

Follows the attribute definition at html.spec.whatwg.org/srcdoc

String
-> Attribute { compatible | srclang : SupportedAttribute } msg

Follows the attribute definition at html.spec.whatwg.org/srclang

List String
-> Attribute { compatible | srcset : SupportedAttribute } msg
List String
-> Attribute { compatible | sizes : SupportedAttribute } msg
Value
{ blank_ : SupportedValue
, self_ : SupportedValue
, parent_ : SupportedValue
, top_ : SupportedValue
, frame : SupportedValue
}
-> Attribute { compatible | target : SupportedAttribute } msg
Value
{ submit : SupportedValue
, reset : SupportedValue
, button : SupportedValue
}
-> Attribute { compatible | type_button : SupportedAttribute } msg

Follows the attribute definition at html.spec.whatwg.org/button-type

String
-> Attribute { compatible | type_input : SupportedAttribute } msg

Follows the attribute definition at html.spec.whatwg.org/input-type

Value
{ ordinal : SupportedValue
, loweralpha : SupportedValue
, upperalpha : SupportedValue
, lowerroman : SupportedValue
, upperroman : SupportedValue
}
-> Attribute { compatible | type_list : SupportedAttribute } msg

Follows the attribute definition at html.spec.whatwg.org/ol-type

String
-> Attribute { compatible | type_mime : SupportedAttribute } msg
String
-> Attribute { compatible | usemap : SupportedAttribute } msg

Follows the attribute definition at html.spec.whatwg.org/usemap

String
-> Attribute { compatible | value : SupportedAttribute } msg
String
-> Attribute { compatible | valueAsDate : SupportedAttribute } msg

Follows the attribute definition at html.spec.whatwg.org/input-valueasdate

String
-> Attribute
{ compatible | valueAsNumber : SupportedAttribute }
msg

Follows the attribute definition at html.spec.whatwg.org/input-valueasnumber

Int
-> Attribute
{ compatible | value_ordinal : SupportedAttribute }
msg
width : Int -> Attribute { compatible | width : SupportedAttribute } msg
Value
{ soft : SupportedValue
, hard : SupportedValue
}
-> Attribute { compatible | wrap : SupportedAttribute } msg

Follows the attribute definition at html.spec.whatwg.org/wrap

Values

All of the enumerated values that particular Attributes may have.

allow_forms : Value { compatible | allow_forms : SupportedValue }
allow_modals : Value { compatible | allow_modals : SupportedValue }
allow_orientation_lock : Value { compatible | allow_orientation_lock : SupportedValue }
allow_pointer_lock : Value { compatible | allow_pointer_lock : SupportedValue }
allow_popups : Value { compatible | allow_popups : SupportedValue }
Value
{ compatible
| allow_popups_to_escape_sandbox : SupportedValue
}
allow_presentation : Value { compatible | allow_presentation : SupportedValue }
allow_same_origin : Value { compatible | allow_same_origin : SupportedValue }
allow_scripts : Value { compatible | allow_scripts : SupportedValue }
allow_top_navigation : Value { compatible | allow_top_navigation : SupportedValue }
Value
{ compatible
| allow_top_navigation_by_user_activation : SupportedValue
}
anonymous : Value { compatible | anonymous : SupportedValue }
auto : Value { compatible | auto : SupportedValue }
async : Value { compatible | async : SupportedValue }
backward : Value { compatible | backward : SupportedValue }
blank_ : Value { compatible | blank_ : SupportedValue }
button : Value { compatible | button : SupportedValue }
captions : Value { compatible | captions : SupportedValue }
chapters : Value { compatible | chapters : SupportedValue }
characters : Value { compatible | characters : SupportedValue }
circ : Value { compatible | circ : SupportedValue }
circle : Value { compatible | circle : SupportedValue }
col : Value { compatible | col : SupportedValue }
colgroup : Value { compatible | colgroup : SupportedValue }
decimal : Value { compatible | decimal : SupportedValue }
default_ : Value { compatible | default_ : SupportedValue }
description : Value { compatible | description : SupportedValue }
dialog : Value { compatible | dialog : SupportedValue }
done : Value { compatible | done : SupportedValue }
email : Value { compatible | email : SupportedValue }
enter : Value { compatible | enter : SupportedValue }
form_data : Value { compatible | form_data : SupportedValue }
form_url_encoded : Value { compatible | form_url_encoded : SupportedValue }
forward : Value { compatible | forward : SupportedValue }
frame : String -> Value { compatible | frame : SupportedValue }
get : Value { compatible | get : SupportedValue }
go : Value { compatible | go : SupportedValue }
hard : Value { compatible | hard : SupportedValue }
loweralpha : Value { compatible | loweralpha : SupportedValue }
lowerroman : Value { compatible | lowerroman : SupportedValue }
ltr : Value { compatible | ltr : SupportedValue }
metadata : Value { compatible | metadata : SupportedValue }
no : Value { compatible | no : SupportedValue }
none : Value { compatible | none : SupportedValue }
numeric : Value { compatible | numeric : SupportedValue }
off : Value { compatible | off : SupportedValue }
on : Value { compatible | on : SupportedValue }
ordinal : Value { compatible | ordinal : SupportedValue }
parent_ : Value { compatible | parent_ : SupportedValue }
plaintext : Value { compatible | plaintext : SupportedValue }
poly : Value { compatible | poly : SupportedValue }
polygon : Value { compatible | polygon : SupportedValue }
post : Value { compatible | post : SupportedValue }
rect : Value { compatible | rect : SupportedValue }
rectangle : Value { compatible | rectangle : SupportedValue }
reset : Value { compatible | reset : SupportedValue }
row : Value { compatible | row : SupportedValue }
rowgroup : Value { compatible | rowgroup : SupportedValue }
rtl : Value { compatible | rtl : SupportedValue }
self_ : Value { compatible | self_ : SupportedValue }
send : Value { compatible | send : SupportedValue }
sentences : Value { compatible | sentences : SupportedValue }
soft : Value { compatible | soft : SupportedValue }
submit : Value { compatible | submit : SupportedValue }
subtitles : Value { compatible | subtitles : SupportedValue }
sync : Value { compatible | sync : SupportedValue }
tel : Value { compatible | tel : SupportedValue }
text : Value { compatible | text : SupportedValue }
top_ : Value { compatible | top_ : SupportedValue }
upperalpha : Value { compatible | upperalpha : SupportedValue }
upperroman : Value { compatible | upperroman : SupportedValue }
url : Value { compatible | url : SupportedValue }
use_credentials : Value { compatible | use_credentials : SupportedValue }
words : Value { compatible | words : SupportedValue }
yes : Value { compatible | yes : SupportedValue }

Escape Hatch

attribute : String -> String -> Attribute a msg

Use this to break out of this package's requirements. Useful if there is something that this package does not allow and you want to support it.

Not Supported

Some Attributes are not supported as they either break elm's guarantee or they are assignable to elements that are not supported as part of this package's use and guarantee.