-module(lustre@attribute). -compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch]). -export([attribute/2, property/2, accesskey/1, autocapitalize/1, autocorrect/1, autofocus/1, class/1, none/0, classes/1, contenteditable/1, data/2, dir/1, draggable/1, enterkeyhint/1, hidden/1, id/1, inert/1, inputmode/1, is/1, itemid/1, itemprop/1, itemscope/1, itemtype/1, lang/1, nonce/1, popover/1, spellcheck/1, style/2, styles/1, tabindex/1, title/1, translate/1, writingsuggestions/1, href/1, target/1, download/1, ping/1, rel/1, hreflang/1, referrerpolicy/1, alt/1, src/1, srcset/1, sizes/1, crossorigin/1, usemap/1, ismap/1, width/1, height/1, decoding/1, loading/1, fetchpriority/1, accept_charset/1, action/1, enctype/1, method/1, novalidate/1, accept/1, alpha/1, autocomplete/1, checked/1, colorspace/1, dirname/1, disabled/1, for/1, form/1, formaction/1, formenctype/1, formmethod/1, formnovalidate/1, formtarget/1, list/1, max/1, maxlength/1, min/1, minlength/1, multiple/1, name/1, pattern/1, placeholder/1, popovertarget/1, popovertargetaction/1, readonly/1, required/1, selected/1, size/1, step/1, type_/1, value/1, http_equiv/1, content/1, charset/1, media/1, autoplay/1, controls/1, loop/1, muted/1, playsinline/1, poster/1, preload/1, shadowrootmode/1, shadowrootdelegatesfocus/1, shadowrootclonable/1, shadowrootserializable/1, aria/2, role/1, aria_activedescendant/1, aria_atomic/1, aria_autocomplete/1, aria_braillelabel/1, aria_brailleroledescription/1, aria_busy/1, aria_checked/1, aria_colcount/1, aria_colindex/1, aria_colindextext/1, aria_colspan/1, aria_controls/1, aria_current/1, aria_describedby/1, aria_description/1, aria_details/1, aria_disabled/1, aria_errormessage/1, aria_expanded/1, aria_flowto/1, aria_haspopup/1, aria_hidden/1, aria_invalid/1, aria_keyshortcuts/1, aria_label/1, aria_labelledby/1, aria_level/1, aria_live/1, aria_modal/1, aria_multiline/1, aria_multiselectable/1, aria_orientation/1, aria_owns/1, aria_placeholder/1, aria_posinset/1, aria_pressed/1, aria_readonly/1, aria_relevant/1, aria_required/1, aria_roledescription/1, aria_rowcount/1, aria_rowindex/1, aria_rowindextext/1, aria_rowspan/1, aria_selected/1, aria_setsize/1, aria_sort/1, aria_valuemax/1, aria_valuemin/1, aria_valuenow/1, aria_valuetext/1]). -if(?OTP_RELEASE >= 27). -define(MODULEDOC(Str), -moduledoc(Str)). -define(DOC(Str), -doc(Str)). -else. -define(MODULEDOC(Str), -compile([])). -define(DOC(Str), -compile([])). -endif. -file("src/lustre/attribute.gleam", 34). ?DOC( " Create an HTML attribute. This is like saying `element.setAttribute(\"class\", \"wibble\")`\n" " in JavaScript. Attributes will be rendered when calling [`element.to_string`](./element.html#to_string).\n" "\n" " > **Note**: there is a subtle difference between attributes and properties. You\n" " > can read more about the implications of this\n" " > [here](https://github.com/lustre-labs/lustre/blob/main/pages/hints/attributes-vs-properties.md).\n" ). -spec attribute(binary(), binary()) -> lustre@vdom@vattr:attribute(any()). attribute(Name, Value) -> lustre@vdom@vattr:attribute(Name, Value). -file("src/lustre/attribute.gleam", 53). ?DOC( " Create a DOM property. This is like saying `element.className = \"wibble\"` in\n" " JavaScript. Properties will be **not** be rendered when calling\n" " [`element.to_string`](./element.html#to_string).\n" "\n" " > **Note**: there is a subtle difference between attributes and properties. You\n" " > can read more about the implications of this\n" " > [here](https://github.com/lustre-labs/lustre/blob/main/pages/hints/attributes-vs-properties.md).\n" ). -spec property(binary(), gleam@json:json()) -> lustre@vdom@vattr:attribute(any()). property(Name, Value) -> lustre@vdom@vattr:property(Name, Value). -file("src/lustre/attribute.gleam", 38). -spec boolean_attribute(binary(), boolean()) -> lustre@vdom@vattr:attribute(any()). boolean_attribute(Name, Value) -> case Value of true -> attribute(Name, <<""/utf8>>); false -> property(Name, gleam@json:bool(false)) end. -file("src/lustre/attribute.gleam", 79). ?DOC( " Defines a shortcut key to activate or focus the element. Multiple options\n" " may be provided as a set of space-separated characters that are exactly one\n" " code point each.\n" "\n" " The way to activate the access key depends on the browser and its platform:\n" "\n" " | | Windows | Linux | Mac OS |\n" " |---------|-------------------|---------------------|---------------------|\n" " | Firefox | Alt + Shift + key | Alt + Shift + key | Ctrl + Option + key |\n" " | Chrome | Alt + key | Ctrl + Option + key | Ctrl + Option + key |\n" " | Safari | | | Ctrl + Option + key |\n" ). -spec accesskey(binary()) -> lustre@vdom@vattr:attribute(any()). accesskey(Key) -> attribute(<<"accesskey"/utf8>>, Key). -file("src/lustre/attribute.gleam", 112). ?DOC( " Controls whether text input is automatically capitalised. The following values\n" " are accepted:\n" "\n" " | Value | Mode |\n" " |--------------|------------|\n" " | \"\" | default |\n" " | \"none\" | none |\n" " | \"off\" | |\n" " | \"sentences\" | sentences |\n" " | \"on\" | |\n" " | \"words\" | words |\n" " | \"characters\" | characters |\n" "\n" " The autocapitalisation processing model is based on the following five modes:\n" "\n" " - **default**: The user agent and input method should make their own determination\n" " of whether or not to enable autocapitalization.\n" "\n" " - **none**: No autocapitalisation should be applied (all letters should default\n" " to lowercase).\n" "\n" " - **sentences**: The first letter of each sentence should default to a capital\n" " letter; all other letters should default to lowercase.\n" "\n" " - **words**: The first letter of each word should default to a capital letter;\n" " all other letters should default to lowercase.\n" "\n" " - **characters**: All letters should default to uppercase.\n" ). -spec autocapitalize(binary()) -> lustre@vdom@vattr:attribute(any()). autocapitalize(Value) -> attribute(<<"autocapitalize"/utf8>>, Value). -file("src/lustre/attribute.gleam", 122). ?DOC( " Controls whether the user agent may automatically correct mispelled words\n" " while typing. Whether or not spelling is corrected is left up to the user\n" " agent and may also depend on the user's settings.\n" "\n" " When disabled the user agent is **never** allowed to correct spelling.\n" ). -spec autocorrect(boolean()) -> lustre@vdom@vattr:attribute(any()). autocorrect(Enabled) -> boolean_attribute(<<"autocorrect"/utf8>>, Enabled). -file("src/lustre/attribute.gleam", 133). ?DOC( " For server-rendered HTML, this attribute controls whether an element should\n" " be focused when the page first loads.\n" "\n" " > **Note**: Lustre's runtime augments that native behaviour of this attribute.\n" " > Whenever it is toggled true, the element will be automatically focused even\n" " > if it already exists in the DOM.\n" ). -spec autofocus(boolean()) -> lustre@vdom@vattr:attribute(any()). autofocus(Should_autofocus) -> boolean_attribute(<<"autofocus"/utf8>>, Should_autofocus). -file("src/lustre/attribute.gleam", 148). ?DOC( " A class is a non-unique identifier for an element primarily used for styling\n" " purposes. You can provide multiple classes as a space-separated list and any\n" " style rules that apply to any of the classes will be applied to the element.\n" "\n" " To conditionally toggle classes on and off, you can use the [`classes`](#classes)\n" " function instead.\n" "\n" " > **Note**: unlike most attributes, multiple `class` attributes are merged\n" " > with any existing other classes on an element. Classes added _later_ in the\n" " > list will override classes added earlier.\n" ). -spec class(binary()) -> lustre@vdom@vattr:attribute(any()). class(Name) -> attribute(<<"class"/utf8>>, Name). -file("src/lustre/attribute.gleam", 61). ?DOC( " Create an empty attribute. This is not added to the DOM and not rendered when\n" " calling [`element.to_string`](./element.html#to_string), but it is useful for\n" " _conditionally_ adding attributes to an element.\n" ). -spec none() -> lustre@vdom@vattr:attribute(any()). none() -> class(<<""/utf8>>). -file("src/lustre/attribute.gleam", 165). -spec do_classes(list({binary(), boolean()}), binary()) -> binary(). do_classes(Names, Class) -> case Names of [] -> Class; [{Name, true} | Rest] -> <<<<<>/binary, " "/utf8>>/binary, (do_classes(Rest, Class))/binary>>; [{_, false} | Rest@1] -> do_classes(Rest@1, Class) end. -file("src/lustre/attribute.gleam", 161). ?DOC( " A class is a non-unique identifier for an element primarily used for styling\n" " purposes. You can provide multiple classes as a space-separated list and any\n" " style rules that apply to any of the classes will be applied to the element.\n" " This function allows you to conditionally toggle classes on and off.\n" "\n" " > **Note**: unlike most attributes, multiple `class` attributes are merged\n" " > with any existing other classes on an element. Classes added _later_ in the\n" " > list will override classes added earlier.\n" ). -spec classes(list({binary(), boolean()})) -> lustre@vdom@vattr:attribute(any()). classes(Names) -> class(do_classes(Names, <<""/utf8>>)). -file("src/lustre/attribute.gleam", 186). ?DOC( " Indicates whether the element's content is editable by the user, allowing them\n" " to modify the HTML content directly. The following values are accepted:\n" "\n" " | Value | Description |\n" " |--------------|-------------------------------------------------------|\n" " | \"true\" | The element is editable. |\n" " | \"\" | |\n" " | \"false\" | The element is not editable. |\n" " | \"plain-text\" | The element is editable without rich text formatting. |\n" "\n" " > **Note**: setting the value to an empty string does *not* disable this\n" " > attribute, and is instead equivalent to setting it to `\"true\"`!\n" ). -spec contenteditable(binary()) -> lustre@vdom@vattr:attribute(any()). contenteditable(Is_editable) -> attribute(<<"contenteditable"/utf8>>, Is_editable). -file("src/lustre/attribute.gleam", 195). ?DOC( " Add a `data-*` attribute to an HTML element. The key will be prefixed by\n" " `\"data-\"`, and accessible from JavaScript or in Gleam decoders under the\n" " path `element.dataset.key` where `key` is the key you provide to this\n" " function.\n" ). -spec data(binary(), binary()) -> lustre@vdom@vattr:attribute(any()). data(Key, Value) -> attribute(<<"data-"/utf8, Key/binary>>, Value). -file("src/lustre/attribute.gleam", 213). ?DOC( " Specifies the text direction of the element's content. The following values\n" " are accepted:\n" "\n" " | Value | Description |\n" " |--------|----------------------------------------------------------------------|\n" " | \"ltr\" | The element's content is left-to-right. |\n" " | \"rtl\" | The element's content is right-to-left. |\n" " | \"auto\" | The element's content direction is determined by the content itself. |\n" "\n" " > **Note**: the `\"auto\"` value should only be used as a last resort in cases\n" " > where the content's direction is truly unknown. The heuristic used by\n" " > browsers is naive and only considers the first character available that\n" " > indicates the direction.\n" ). -spec dir(binary()) -> lustre@vdom@vattr:attribute(any()). dir(Direction) -> attribute(<<"dir"/utf8>>, Direction). -file("src/lustre/attribute.gleam", 220). ?DOC( " Indicates whether the element can be dragged as part of the HTML drag-and-drop\n" " API.\n" ). -spec draggable(boolean()) -> lustre@vdom@vattr:attribute(any()). draggable(Is_draggable) -> attribute(<<"draggable"/utf8>>, case Is_draggable of true -> <<"true"/utf8>>; false -> <<"false"/utf8>> end). -file("src/lustre/attribute.gleam", 245). ?DOC( " Specifies what action label (or potentially icon) to present for the \"enter\"\n" " key on virtual keyboards such as mobile devices. The following values are\n" " accepted:\n" "\n" " | Value | Example |\n" " |------------|----------------|\n" " | \"enter\" | \"return\", \"↵\" |\n" " | \"done\" | \"done\", \"✅\" |\n" " | \"go\" | \"go\" |\n" " | \"next\" | \"next\" |\n" " | \"previous\" | \"return\" |\n" " | \"search\" | \"search\", \"🔍\" |\n" " | \"send\" | \"send\" |\n" "\n" " The examples listed are demonstrative and may not be the actual labels used\n" " by user agents. When unspecified or invalid, the user agent may use contextual\n" " information such as the type of an input to determine the label.\n" ). -spec enterkeyhint(binary()) -> lustre@vdom@vattr:attribute(any()). enterkeyhint(Value) -> attribute(<<"enterkeyhint"/utf8>>, Value). -file("src/lustre/attribute.gleam", 255). ?DOC( " Indicates whether the element is relevant to the page's current state. A\n" " hidden element is not visible to the user and is inaccessible to assistive\n" " technologies such as screen readers. This makes it unsuitable for simple\n" " presentation purposes, but it can be useful for example to render something\n" " that may be made visible later.\n" ). -spec hidden(boolean()) -> lustre@vdom@vattr:attribute(any()). hidden(Is_hidden) -> boolean_attribute(<<"hidden"/utf8>>, Is_hidden). -file("src/lustre/attribute.gleam", 264). ?DOC( " The `\"id\"` attribute is used to uniquely identify a single element within a\n" " document. It can be used to reference the element in CSS with the selector\n" " `#id`, in JavaScript with `document.getElementById(\"id\")`, or by anchors on\n" " the same page with the URL `\"#id\"`.\n" ). -spec id(binary()) -> lustre@vdom@vattr:attribute(any()). id(Value) -> attribute(<<"id"/utf8>>, Value). -file("src/lustre/attribute.gleam", 274). ?DOC( " Marks the element as inert, meaning it is not currently interactive and does\n" " not receive user input. For sighted users, it's common to style inert elements\n" " in a way that makes them visually distinct from active elements, such as by\n" " greying them out: this can help avoid confusion for users who may not otherwise\n" " know the content they are looking at is inactive.\n" ). -spec inert(boolean()) -> lustre@vdom@vattr:attribute(any()). inert(Is_inert) -> boolean_attribute(<<"inert"/utf8>>, Is_inert). -file("src/lustre/attribute.gleam", 295). ?DOC( " Hints to the user agent about what type of virtual keyboard to display when\n" " the user interacts with the element. The following values are accepted:\n" "\n" " | Value | Description |\n" " |--------------|---------------------------------------------------------------|\n" " | \"none\" | No virtual keyboard should be displayed. |\n" " | \"text\" | A standard text input keyboard. |\n" " | \"decimal\" | A numeric keyboard with locale-appropriate separator. |\n" " | \"numeric\" | A numeric keyboard. |\n" " | \"tel\" | A telephone keypad including \"#\" and \"*\". |\n" " | \"email\" | A keyboard for entering email addresses including \"@\" and \".\" |\n" " | \"url\" | A keyboard for entering URLs including \"/\" and \".\". |\n" " | \"search\" | A keyboard for entering search queries should be shown. |\n" "\n" " The `\"none\"` value should only be used in cases where you are rendering a\n" " custom input method, otherwise the user will not be able to enter any text!\n" ). -spec inputmode(binary()) -> lustre@vdom@vattr:attribute(any()). inputmode(Value) -> attribute(<<"inputmode"/utf8>>, Value). -file("src/lustre/attribute.gleam", 302). ?DOC( " Specifies the [customised built-in element](https://html.spec.whatwg.org/#customized-built-in-element)\n" " to be used in place of the native element this attribute is applied to.\n" ). -spec is(binary()) -> lustre@vdom@vattr:attribute(any()). is(Value) -> attribute(<<"is"/utf8>>, Value). -file("src/lustre/attribute.gleam", 310). ?DOC( " Used as part of the [Microdata](https://schema.org/docs/gs.html) format to\n" " specify the global unique identifier of an item, for example books that are\n" " identifiable by their ISBN.\n" ). -spec itemid(binary()) -> lustre@vdom@vattr:attribute(any()). itemid(Id) -> attribute(<<"itemid"/utf8>>, Id). -file("src/lustre/attribute.gleam", 318). ?DOC( " Used as part of the [Microdata](https://schema.org/docs/gs.html) format to\n" " specify that the content of the element is to be treated as a value of the\n" " given property name.\n" ). -spec itemprop(binary()) -> lustre@vdom@vattr:attribute(any()). itemprop(Name) -> attribute(<<"itemprop"/utf8>>, Name). -file("src/lustre/attribute.gleam", 326). ?DOC( " Used as part of the [Microdata](https://schema.org/docs/gs.html) format to\n" " indicate that the element and its descendants form a single item of key-value\n" " data.\n" ). -spec itemscope(boolean()) -> lustre@vdom@vattr:attribute(any()). itemscope(Has_scope) -> boolean_attribute(<<"itemscope"/utf8>>, Has_scope). -file("src/lustre/attribute.gleam", 335). ?DOC( " Used as part of the [Microdata](https://schema.org/docs/gs.html) format to\n" " specify the type of item being described. This is a URL that points to\n" " a schema containing the vocabulary used for an item's key-value pairs, such\n" " as a schema.org type.\n" ). -spec itemtype(binary()) -> lustre@vdom@vattr:attribute(any()). itemtype(Url) -> attribute(<<"itemtype"/utf8>>, Url). -file("src/lustre/attribute.gleam", 346). ?DOC( " Specifies the language of the element's content and the language of any of\n" " this element's attributes that contain text. The `\"lang\"` attribute applies\n" " to the element itself and all of its descendants, unless overridden by\n" " another `\"lang\"` attribute on a descendant element.\n" "\n" " The value must be a valid [BCP 47 language tag](https://tools.ietf.org/html/bcp47).\n" ). -spec lang(binary()) -> lustre@vdom@vattr:attribute(any()). lang(Language) -> attribute(<<"lang"/utf8>>, Language). -file("src/lustre/attribute.gleam", 353). ?DOC( " A cryptographic nonce used by CSP (Content Security Policy) to allow or\n" " deny the fetch of a given resource.\n" ). -spec nonce(binary()) -> lustre@vdom@vattr:attribute(any()). nonce(Value) -> attribute(<<"nonce"/utf8>>, Value). -file("src/lustre/attribute.gleam", 378). ?DOC( " Specifies that the element should be treated as a popover, rendering it in\n" " the top-layer above all other content when the popover is active. The following\n" " values are accepted:\n" "\n" " | Value | Description |\n" " |--------------|------------------------------------------------|\n" " | \"auto\" | Closes other popovers when opened. |\n" " | \"\" | |\n" " | \"manual\" | Does not close other popovers when opened. |\n" " | \"hint\" | Closes only other \"hint\" popovers when opened. |\n" "\n" " All modes except `\"manual\"` support \"light dismiss\" letting the user close\n" " the popover by clicking outside of it, as well as respond to close requests\n" " letting the user dismiss a popover by pressing the \"escape\" key or by using\n" " the dismiss gesture on any assistive technology.\n" "\n" " Popovers can be triggered either programmatically through the `showPopover()`\n" " method, or by assigning an [`id`](#id) to the element and including the\n" " [`popovertarget`](#popovertarget) attribute on the element that should trigger\n" " the popover.\n" ). -spec popover(binary()) -> lustre@vdom@vattr:attribute(any()). popover(Value) -> attribute(<<"popover"/utf8>>, Value). -file("src/lustre/attribute.gleam", 386). ?DOC( " Indicates whether the element's content should be checked for spelling errors.\n" " This typically only applies to inputs and textareas, or elements that are\n" " [`contenteditable`](#contenteditable).\n" ). -spec spellcheck(boolean()) -> lustre@vdom@vattr:attribute(any()). spellcheck(Should_check) -> attribute(<<"spellcheck"/utf8>>, case Should_check of true -> <<"true"/utf8>>; false -> <<"false"/utf8>> end). -file("src/lustre/attribute.gleam", 401). ?DOC( " Provide a single property name and value to be used as inline styles for the\n" " element. If either the property name or value is empty, this attribute will\n" " be ignored.\n" "\n" " > **Note**: unlike most attributes, multiple `style` attributes are merged\n" " > with any existing other styles on an element. Styles added _later_ in the\n" " > list will override styles added earlier.\n" ). -spec style(binary(), binary()) -> lustre@vdom@vattr:attribute(any()). style(Property, Value) -> case {Property, Value} of {<<""/utf8>>, _} -> class(<<""/utf8>>); {_, <<""/utf8>>} -> class(<<""/utf8>>); {_, _} -> attribute( <<"style"/utf8>>, <<<<<>/binary, Value/binary>>/binary, ";"/utf8>> ) end. -file("src/lustre/attribute.gleam", 419). -spec do_styles(list({binary(), binary()}), binary()) -> binary(). do_styles(Properties, Styles) -> case Properties of [] -> Styles; [{<<""/utf8>>, _} | Rest] -> do_styles(Rest, Styles); [{_, <<""/utf8>>} | Rest] -> do_styles(Rest, Styles); [{Name, Value} | Rest@1] -> do_styles( Rest@1, <<<<<<<>/binary, ":"/utf8>>/binary, Value/binary>>/binary, ";"/utf8>> ) end. -file("src/lustre/attribute.gleam", 415). ?DOC( " Provide a list of property-value pairs to be used as inline styles for the\n" " element. Empty properties or values are omitted from the final style string.\n" "\n" " > **Note**: unlike most attributes, multiple `styles` attributes are merged\n" " > with any existing other styles on an element. Styles added _later_ in the\n" " > list will override styles added earlier.\n" ). -spec styles(list({binary(), binary()})) -> lustre@vdom@vattr:attribute(any()). styles(Properties) -> attribute(<<"style"/utf8>>, do_styles(Properties, <<""/utf8>>)). -file("src/lustre/attribute.gleam", 447). ?DOC( " Specifies the tabbing order of the element. If an element is not typically\n" " focusable, such as a `
`, it will be made focusable when this attribute\n" " is set.\n" "\n" " Any integer value is accepted, but the following values are recommended:\n" "\n" " - `-1`: indicates the element may receive focus, but should not be sequentially\n" " focusable. The user agent may choose to ignore this preference if, for\n" " example, the user agent is a screen reader.\n" "\n" " - `0`: indicates the element may receive focus and should be placed in the\n" " sequential focus order in the order it appears in the DOM.\n" "\n" " - any positive integer: indicates the element should be placed in the sequential\n" " focus order relative to other elements with a positive tabindex.\n" "\n" " Values other than `0` and `-1` are generally not recommended as managing\n" " the relative order of focusable elements can be difficult and error-prone.\n" ). -spec tabindex(integer()) -> lustre@vdom@vattr:attribute(any()). tabindex(Index) -> attribute(<<"tabindex"/utf8>>, erlang:integer_to_binary(Index)). -file("src/lustre/attribute.gleam", 459). ?DOC( " Annotate an element with additional information that may be suitable as a\n" " tooltip, such as a description of a link or image.\n" "\n" " It is **not** recommended to use the `title` attribute as a way of providing\n" " accessibility information to assistive technologies. User agents often do not\n" " expose the `title` attribute to keyboard-only users or touch devices, for\n" " example.\n" ). -spec title(binary()) -> lustre@vdom@vattr:attribute(any()). title(Text) -> attribute(<<"title"/utf8>>, Text). -file("src/lustre/attribute.gleam", 481). ?DOC( " Controls whether an element's content may be translated by the user agent\n" " when the page is localised. This includes both the element's text content\n" " and some of its attributes:\n" "\n" " | Attribute | Element(s) |\n" " |-------------|--------------------------------------------|\n" " | abbr | th |\n" " | alt | area, img, input |\n" " | content | meta |\n" " | download | a, area |\n" " | label | optgroup, option, track |\n" " | lang | * |\n" " | placeholder | input, textarea |\n" " | srcdoc | iframe |\n" " | title | * |\n" " | style | * |\n" " | value | input (with type=\"button\" or type=\"reset\") |\n" ). -spec translate(boolean()) -> lustre@vdom@vattr:attribute(any()). translate(Should_translate) -> attribute(<<"translate"/utf8>>, case Should_translate of true -> <<"yes"/utf8>>; false -> <<"no"/utf8>> end). -file("src/lustre/attribute.gleam", 490). ?DOC(" Indicates if writing suggestions should be enabled for this element.\n"). -spec writingsuggestions(boolean()) -> lustre@vdom@vattr:attribute(any()). writingsuggestions(Enabled) -> attribute(<<"writingsuggestions"/utf8>>, case Enabled of true -> <<"true"/utf8>>; false -> <<"false"/utf8>> end). -file("src/lustre/attribute.gleam", 502). ?DOC( " Specifies the URL of a linked resource. This attribute can be used on various\n" " elements to create hyperlinks or to load resources.\n" ). -spec href(binary()) -> lustre@vdom@vattr:attribute(any()). href(Url) -> attribute(<<"href"/utf8>>, Url). -file("src/lustre/attribute.gleam", 520). ?DOC( " Specifies where to display the linked resource or where to open the link.\n" " The following values are accepted:\n" "\n" " | Value | Description |\n" " |-----------|---------------------------------------------------------|\n" " | \"_self\" | Open in the same frame/window (default) |\n" " | \"_blank\" | Open in a new window or tab |\n" " | \"_parent\" | Open in the parent frame |\n" " | \"_top\" | Open in the full body of the window |\n" " | framename | Open in a named frame |\n" "\n" " > **Note**: consider against using `\"_blank\"` for links to external sites as it\n" " > removes user control over their browsing experience.\n" ). -spec target(binary()) -> lustre@vdom@vattr:attribute(any()). target(Value) -> attribute(<<"target"/utf8>>, Value). -file("src/lustre/attribute.gleam", 527). ?DOC( " Indicates that the linked resource should be downloaded rather than displayed.\n" " When provided with a value, it suggests a filename for the downloaded file.\n" ). -spec download(binary()) -> lustre@vdom@vattr:attribute(any()). download(Filename) -> attribute(<<"download"/utf8>>, Filename). -file("src/lustre/attribute.gleam", 535). ?DOC( " Provides a space-separated list of URLs that will be notified if the user\n" " follows the hyperlink. These URLs will receive POST requests with bodies\n" " of type `ping/1.0`.\n" ). -spec ping(list(binary())) -> lustre@vdom@vattr:attribute(any()). ping(Urls) -> attribute(<<"ping"/utf8>>, gleam@string:join(Urls, <<" "/utf8>>)). -file("src/lustre/attribute.gleam", 542). ?DOC( " Specifies the relationship between the current document and the linked resource.\n" " Multiple relationship values can be provided as a space-separated list.\n" ). -spec rel(binary()) -> lustre@vdom@vattr:attribute(any()). rel(Value) -> attribute(<<"rel"/utf8>>, Value). -file("src/lustre/attribute.gleam", 549). ?DOC( " Specifies the language of the linked resource. The value must be a valid\n" " [BCP 47 language tag](https://tools.ietf.org/html/bcp47).\n" ). -spec hreflang(binary()) -> lustre@vdom@vattr:attribute(any()). hreflang(Language) -> attribute(<<"hreflang"/utf8>>, Language). -file("src/lustre/attribute.gleam", 567). ?DOC( " Specifies the referrer policy for fetches initiated by the element. The\n" " following values are accepted:\n" "\n" " | Value | Description |\n" " |-----------------------------------|--------------------------------------------------------|\n" " | \"no-referrer\" | No Referer header is sent |\n" " | \"no-referrer-when-downgrade\" | Only send Referer for same-origin or more secure |\n" " | \"origin\" | Send only the origin part of the URL |\n" " | \"origin-when-cross-origin\" | Full URL for same-origin, origin only for cross-origin |\n" " | \"same-origin\" | Only send Referer for same-origin requests |\n" " | \"strict-origin\" | Like origin, but only to equally secure destinations |\n" " | \"strict-origin-when-cross-origin\" | Default policy with varying levels of restriction |\n" " | \"unsafe-url\" | Always send the full URL |\n" ). -spec referrerpolicy(binary()) -> lustre@vdom@vattr:attribute(any()). referrerpolicy(Value) -> attribute(<<"referrerpolicy"/utf8>>, Value). -file("src/lustre/attribute.gleam", 577). ?DOC( " Specifies text that should be displayed when the image cannot be rendered.\n" " This attribute is essential for accessibility, providing context about the\n" " image to users who cannot see it, including those using screen readers.\n" ). -spec alt(binary()) -> lustre@vdom@vattr:attribute(any()). alt(Text) -> attribute(<<"alt"/utf8>>, Text). -file("src/lustre/attribute.gleam", 583). ?DOC(" Specifies the URL of an image or resource to be used.\n"). -spec src(binary()) -> lustre@vdom@vattr:attribute(any()). src(Url) -> attribute(<<"src"/utf8>>, Url). -file("src/lustre/attribute.gleam", 591). ?DOC( " Specifies a set of image sources for different display scenarios. This allows\n" " browsers to choose the most appropriate image based on factors like screen\n" " resolution and viewport size.\n" ). -spec srcset(binary()) -> lustre@vdom@vattr:attribute(any()). srcset(Sources) -> attribute(<<"srcset"/utf8>>, Sources). -file("src/lustre/attribute.gleam", 598). ?DOC( " Used with `srcset` to define the size of images in different layout scenarios.\n" " Helps the browser select the most appropriate image source.\n" ). -spec sizes(binary()) -> lustre@vdom@vattr:attribute(any()). sizes(Value) -> attribute(<<"sizes"/utf8>>, Value). -file("src/lustre/attribute.gleam", 605). ?DOC( " Configures the CORS (Cross-Origin Resource Sharing) settings for the element.\n" " Valid values are \"anonymous\" and \"use-credentials\".\n" ). -spec crossorigin(binary()) -> lustre@vdom@vattr:attribute(any()). crossorigin(Value) -> attribute(<<"crossorigin"/utf8>>, Value). -file("src/lustre/attribute.gleam", 611). ?DOC(" Specifies the name of an image map to be used with the image.\n"). -spec usemap(binary()) -> lustre@vdom@vattr:attribute(any()). usemap(Value) -> attribute(<<"usemap"/utf8>>, Value). -file("src/lustre/attribute.gleam", 618). ?DOC( " Indicates that the image is a server-side image map. When a user clicks on the\n" " image, the coordinates of the click are sent to the server.\n" ). -spec ismap(boolean()) -> lustre@vdom@vattr:attribute(any()). ismap(Is_map) -> boolean_attribute(<<"ismap"/utf8>>, Is_map). -file("src/lustre/attribute.gleam", 624). ?DOC(" Specifies the width of the element in pixels.\n"). -spec width(integer()) -> lustre@vdom@vattr:attribute(any()). width(Value) -> property(<<"width"/utf8>>, gleam@json:int(Value)). -file("src/lustre/attribute.gleam", 630). ?DOC(" Specifies the height of the element in pixels.\n"). -spec height(integer()) -> lustre@vdom@vattr:attribute(any()). height(Value) -> property(<<"height"/utf8>>, gleam@json:int(Value)). -file("src/lustre/attribute.gleam", 637). ?DOC( " Provides a hint about how the image should be decoded. Valid values are\n" " \"sync\", \"async\", and \"auto\".\n" ). -spec decoding(binary()) -> lustre@vdom@vattr:attribute(any()). decoding(Value) -> attribute(<<"decoding"/utf8>>, Value). -file("src/lustre/attribute.gleam", 644). ?DOC( " Indicates how the browser should load the image. Valid values are \"eager\"\n" " (load immediately) and \"lazy\" (defer loading until needed).\n" ). -spec loading(binary()) -> lustre@vdom@vattr:attribute(any()). loading(Value) -> attribute(<<"loading"/utf8>>, Value). -file("src/lustre/attribute.gleam", 651). ?DOC( " Sets the priority for fetches initiated by the element. Valid values are\n" " \"high\", \"low\", and \"auto\".\n" ). -spec fetchpriority(binary()) -> lustre@vdom@vattr:attribute(any()). fetchpriority(Value) -> attribute(<<"fetchpriority"/utf8>>, Value). -file("src/lustre/attribute.gleam", 661). ?DOC( " Specifies the character encodings to be used for form submission. This allows\n" " servers to know how to interpret the form data. Multiple encodings can be\n" " specified as a space-separated list.\n" ). -spec accept_charset(binary()) -> lustre@vdom@vattr:attribute(any()). accept_charset(Charsets) -> attribute(<<"accept-charset"/utf8>>, Charsets). -file("src/lustre/attribute.gleam", 668). ?DOC( " Specifies the URL to which the form's data should be sent when submitted.\n" " This can be overridden by formaction attributes on submit buttons.\n" ). -spec action(binary()) -> lustre@vdom@vattr:attribute(any()). action(Url) -> attribute(<<"action"/utf8>>, Url). -file("src/lustre/attribute.gleam", 681). ?DOC( " Specifies how form data should be encoded before sending it to the server.\n" " Valid values include:\n" "\n" " | Value | Description |\n" " |-----------------------------------|---------------------------------------|\n" " | \"application/x-www-form-urlencoded\" | Default encoding (spaces as +, etc.) |\n" " | \"multipart/form-data\" | Required for file uploads |\n" " | \"text/plain\" | Simple encoding with minimal escaping |\n" ). -spec enctype(binary()) -> lustre@vdom@vattr:attribute(any()). enctype(Encoding_type) -> attribute(<<"enctype"/utf8>>, Encoding_type). -file("src/lustre/attribute.gleam", 693). ?DOC( " Specifies the HTTP method to use when submitting the form. Common values are:\n" "\n" " | Value | Description |\n" " |----------|----------------------------------------------------------|\n" " | \"get\" | Appends form data to URL (default) |\n" " | \"post\" | Sends form data in the body of the HTTP request |\n" " | \"dialog\" | Closes a dialog if the form is inside one |\n" ). -spec method(binary()) -> lustre@vdom@vattr:attribute(any()). method(Http_method) -> attribute(<<"method"/utf8>>, Http_method). -file("src/lustre/attribute.gleam", 700). ?DOC( " When present, indicates that the form should not be validated when submitted.\n" " This allows submission of forms with invalid or incomplete data.\n" ). -spec novalidate(boolean()) -> lustre@vdom@vattr:attribute(any()). novalidate(Disable_validation) -> boolean_attribute(<<"novalidate"/utf8>>, Disable_validation). -file("src/lustre/attribute.gleam", 725). ?DOC( " A hint for the user agent about what file types are expected to be submitted.\n" " The following values are accepted:\n" "\n" " | Value | Description |\n" " |-----------|------------------------------------------------------|\n" " | \"audio/*\" | Any audio file type. |\n" " | \"video/*\" | Any video file type. |\n" " | \"image/*\" | Any image file type. |\n" " | mime/type | A complete MIME type, without additional parameters. |\n" " | .ext | Indicates any file with the given extension. |\n" "\n" " The following input types support the `\"accept\"` attribute:\n" "\n" " - `\"file\"`\n" "\n" " > **Note**: the `\"accept\"` attribute is a *hint* to the user agent and does\n" " > not guarantee that the user will only be able to select files of the specified\n" " > type.\n" ). -spec accept(list(binary())) -> lustre@vdom@vattr:attribute(any()). accept(Values) -> attribute(<<"accept"/utf8>>, gleam@string:join(Values, <<","/utf8>>)). -file("src/lustre/attribute.gleam", 736). ?DOC( " Allow a colour's alpha component to be manipulated, allowing the user to\n" " select a colour with transparency.\n" "\n" " The following input types support the `\"alpha\"` attribute:\n" "\n" " - `\"color\"`\n" ). -spec alpha(boolean()) -> lustre@vdom@vattr:attribute(any()). alpha(Allowed) -> boolean_attribute(<<"alpha"/utf8>>, Allowed). -file("src/lustre/attribute.gleam", 781). ?DOC( " A hint for the user agent to automatically fill the value of the input with\n" " an appropriate value. The format for the `\"autocomplete\"` attribute is a\n" " space-separated ordered list of optional tokens:\n" "\n" " \"section-* (shipping | billing) [...fields] webauthn\"\n" "\n" " - `section-*`: used to disambiguate between two fields with otherwise identical\n" " autocomplete values. The `*` is replaced with a string that identifies the\n" " section of the form.\n" "\n" " - `shipping | billing`: indicates the field is related to shipping or billing\n" " address or contact information.\n" "\n" " - `[...fields]`: a space-separated list of field names that are relevant to\n" " the input, for example `\"email\"`, `\"name family-name\"`, or `\"home tel\"`.\n" "\n" " - `webauthn`: indicates the field can be automatically filled with a WebAuthn\n" " passkey.\n" "\n" " In addition, the value may instead be `\"off\"` to disable autocomplete for the\n" " input, or `\"on\"` to let the user agent decide based on context what values\n" " are appropriate.\n" "\n" " The following input types support the `\"autocomplete\"` attribute:\n" "\n" " - `\"color\"`\n" " - `\"date\"`\n" " - `\"datetime-local\"`\n" " - `\"email\"`\n" " - `\"hidden\"`\n" " - `\"month\"`\n" " - `\"number\"`\n" " - `\"password\"`\n" " - `\"range\"`\n" " - `\"search\"`\n" " - `\"tel\"`\n" " - `\"text\"`\n" " - `\"time\"`\n" " - `\"url\"`\n" " - `\"week\"`\n" ). -spec autocomplete(binary()) -> lustre@vdom@vattr:attribute(any()). autocomplete(Value) -> attribute(<<"autocomplete"/utf8>>, Value). -file("src/lustre/attribute.gleam", 795). ?DOC( " Whether the control is checked or not. When participating in a form, the\n" " value of the input is included in the form submission if it is checked. For\n" " checkboxes that do not have a value, the value of the input is `\"on\"` when\n" " checked.\n" "\n" " The following input types support the `\"checked\"` attribute:\n" "\n" " - `\"checkbox\"`\n" " - `\"radio\"`\n" ). -spec checked(boolean()) -> lustre@vdom@vattr:attribute(any()). checked(Is_checked) -> boolean_attribute(<<"checked"/utf8>>, Is_checked). -file("src/lustre/attribute.gleam", 814). ?DOC( " The color space of the serialised CSS color. It also hints to user agents\n" " about what kind of interface to present to the user for selecting a color.\n" " The following values are accepted:\n" "\n" " - `\"limited-srgb\"`: The CSS color is converted to the 'srgb' color space and\n" " limited to 8-bits per component, e.g., `\"#123456\"` or\n" " `\"color(srgb 0 1 0 / 0.5)\"`.\n" "\n" " - `\"display-p3\"`: The CSS color is converted to the 'display-p3' color space,\n" " e.g., `\"color(display-p3 1.84 -0.19 0.72 / 0.6)\"`.\n" "\n" " The following input types support the `\"colorspace\"` attribute:\n" "\n" " - `\"color\"`\n" ). -spec colorspace(binary()) -> lustre@vdom@vattr:attribute(any()). colorspace(Value) -> attribute(<<"colorspace"/utf8>>, Value). -file("src/lustre/attribute.gleam", 832). ?DOC( " The name of the field included in a form that indicates the direcionality of\n" " the user's input.\n" "\n" " The following input types support the `\"dirname\"` attribute:\n" "\n" " - `\"email\"`\n" " - `\"hidden\"`\n" " - `\"password\"`\n" " - `\"search\"`\n" " - `\"submit\"\n" " - `\"tel\"`\n" " - `\"text\"`\n" " - `\"url\"`\n" ). -spec dirname(binary()) -> lustre@vdom@vattr:attribute(any()). dirname(Direction) -> attribute(<<"dirname"/utf8>>, Direction). -file("src/lustre/attribute.gleam", 839). ?DOC( " Controls whether or not the input is disabled. Disabled inputs are not\n" " validated during form submission and are not interactive.\n" ). -spec disabled(boolean()) -> lustre@vdom@vattr:attribute(any()). disabled(Is_disabled) -> boolean_attribute(<<"disabled"/utf8>>, Is_disabled). -file("src/lustre/attribute.gleam", 845). ?DOC("\n"). -spec for(binary()) -> lustre@vdom@vattr:attribute(any()). for(Id) -> attribute(<<"for"/utf8>>, Id). -file("src/lustre/attribute.gleam", 851). ?DOC(" Associates the input with a form element located elsewhere in the document.\n"). -spec form(binary()) -> lustre@vdom@vattr:attribute(any()). form(Id) -> attribute(<<"form"/utf8>>, Id). -file("src/lustre/attribute.gleam", 863). ?DOC( " The URL to use for form submission. This URL will override the [`\"action\"`](#action)\n" " attribute on the form element itself, if present.\n" "\n" " The following input types support the `\"formaction\"` attribute:\n" "\n" " - `\"image\"`\n" " - `\"submit\"`\n" ). -spec formaction(binary()) -> lustre@vdom@vattr:attribute(any()). formaction(Url) -> attribute(<<"formaction"/utf8>>, Url). -file("src/lustre/attribute.gleam", 872). ?DOC( " Entry list encoding type to use for form submission\n" "\n" " - `\"image\"`\n" " - `\"submit\"`\n" ). -spec formenctype(binary()) -> lustre@vdom@vattr:attribute(any()). formenctype(Encoding_type) -> attribute(<<"formenctype"/utf8>>, Encoding_type). -file("src/lustre/attribute.gleam", 881). ?DOC( " Variant to use for form submission\n" "\n" " - `\"image\"`\n" " - `\"submit\"`\n" ). -spec formmethod(binary()) -> lustre@vdom@vattr:attribute(any()). formmethod(Method) -> attribute(<<"formmethod"/utf8>>, Method). -file("src/lustre/attribute.gleam", 890). ?DOC( " Bypass form control validation for form submission\n" "\n" " - `\"image\"`\n" " - `\"submit\"`\n" ). -spec formnovalidate(boolean()) -> lustre@vdom@vattr:attribute(any()). formnovalidate(No_validate) -> boolean_attribute(<<"formnovalidate"/utf8>>, No_validate). -file("src/lustre/attribute.gleam", 899). ?DOC( " Navigable for form submission\n" "\n" " - `\"image\"`\n" " - `\"submit\"`\n" ). -spec formtarget(binary()) -> lustre@vdom@vattr:attribute(any()). formtarget(Target) -> attribute(<<"formtarget"/utf8>>, Target). -file("src/lustre/attribute.gleam", 921). ?DOC( " List of autocomplete options\n" "\n" " The following input types support the `\"list\"` attribute:\n" "\n" " - `\"color\"`\n" " - `\"date\"`\n" " - `\"datetime-local\"`\n" " - `\"email\"`\n" " - `\"month\"`\n" " - `\"number\"`\n" " - `\"range\"`\n" " - `\"search\"`\n" " - `\"tel\"`\n" " - `\"text\"`\n" " - `\"time\"`\n" " - `\"url\"`\n" " - `\"week\"`\n" ). -spec list(binary()) -> lustre@vdom@vattr:attribute(any()). list(Id) -> attribute(<<"list"/utf8>>, Id). -file("src/lustre/attribute.gleam", 939). ?DOC( " Constrain the maximum value of a form control. The exact syntax of this value\n" " changes depending on the type of input, for example `\"1\"`, `\"1979-12-31\"`, and\n" " `\"06:00\"` are all potentially valid values for the `\"max\"` attribute.\n" "\n" " The following input types support the `\"max\"` attribute:\n" "\n" " - `\"date\"`\n" " - `\"datetime-local\"`\n" " - `\"month\"`\n" " - `\"number\"`\n" " - `\"range\"`\n" " - `\"time\"`\n" " - `\"week\"`\n" ). -spec max(binary()) -> lustre@vdom@vattr:attribute(any()). max(Value) -> attribute(<<"max"/utf8>>, Value). -file("src/lustre/attribute.gleam", 954). ?DOC( " Maximum length of value\n" "\n" " The following input types support the `\"maxlength\"` attribute:\n" "\n" " - `\"email\"`\n" " - `\"password\"`\n" " - `\"search\"`\n" " - `\"tel\"`\n" " - `\"text\"`\n" " - `\"url\"`\n" ). -spec maxlength(integer()) -> lustre@vdom@vattr:attribute(any()). maxlength(Length) -> attribute(<<"maxlength"/utf8>>, erlang:integer_to_binary(Length)). -file("src/lustre/attribute.gleam", 970). ?DOC( " Minimum value\n" "\n" " The following input types support the `\"max\"` attribute:\n" "\n" " - `\"date\"`\n" " - `\"datetime-local\"`\n" " - `\"month\"`\n" " - `\"number\"`\n" " - `\"range\"`\n" " - `\"time\"`\n" " - `\"week\"`\n" ). -spec min(binary()) -> lustre@vdom@vattr:attribute(any()). min(Value) -> attribute(<<"min"/utf8>>, Value). -file("src/lustre/attribute.gleam", 983). ?DOC( " Minimum length of value\n" "\n" " - `\"email\"`\n" " - `\"password\"`\n" " - `\"search\"`\n" " - `\"tel\"`\n" " - `\"text\"`\n" " - `\"url\"`\n" ). -spec minlength(integer()) -> lustre@vdom@vattr:attribute(any()). minlength(Length) -> attribute(<<"minlength"/utf8>>, erlang:integer_to_binary(Length)). -file("src/lustre/attribute.gleam", 994). ?DOC( " Whether an input or select may allow multiple values to be selected at once.\n" "\n" " The following input types support the `\"multiple\"` attribute:\n" "\n" " - `\"email\"`\n" " - `\"file\"`\n" ). -spec multiple(boolean()) -> lustre@vdom@vattr:attribute(any()). multiple(Allow_multiple) -> boolean_attribute(<<"multiple"/utf8>>, Allow_multiple). -file("src/lustre/attribute.gleam", 1000). ?DOC(" Name of the element to use for form submission and in the form.elements API\n"). -spec name(binary()) -> lustre@vdom@vattr:attribute(any()). name(Element_name) -> attribute(<<"name"/utf8>>, Element_name). -file("src/lustre/attribute.gleam", 1013). ?DOC( " Pattern to be matched by the form control's value\n" "\n" " - `\"email\"`\n" " - `\"password\"`\n" " - `\"search\"`\n" " - `\"tel\"`\n" " - `\"text\"`\n" " - `\"url\"`\n" ). -spec pattern(binary()) -> lustre@vdom@vattr:attribute(any()). pattern(Regex) -> attribute(<<"pattern"/utf8>>, Regex). -file("src/lustre/attribute.gleam", 1027). ?DOC( " User-visible label to be placed within the form control\n" "\n" " - `\"email\"`\n" " - `\"number\"`\n" " - `\"password\"`\n" " - `\"search\"`\n" " - `\"tel\"`\n" " - `\"text\"`\n" " - `\"url\"`\n" ). -spec placeholder(binary()) -> lustre@vdom@vattr:attribute(any()). placeholder(Text) -> attribute(<<"placeholder"/utf8>>, Text). -file("src/lustre/attribute.gleam", 1040). ?DOC( " Targets a popover element to toggle, show, or hide\n" "\n" " The following input types support the `\"popovertarget\"` attribute:\n" "\n" " - `\"button\"`\n" " - `\"image\"`\n" " - `\"reset\"`\n" " - `\"submit\"`\n" ). -spec popovertarget(binary()) -> lustre@vdom@vattr:attribute(any()). popovertarget(Id) -> attribute(<<"popovertarget"/utf8>>, Id). -file("src/lustre/attribute.gleam", 1053). ?DOC( " Indicates whether a targeted popover element is to be toggled, shown, or hidden\n" "\n" " The following input types support the `\"popovertarget\"` attribute:\n" "\n" " - `\"button\"`\n" " - `\"image\"`\n" " - `\"reset\"`\n" " - `\"submit\"`\n" ). -spec popovertargetaction(binary()) -> lustre@vdom@vattr:attribute(any()). popovertargetaction(Action) -> attribute(<<"popovertargetaction"/utf8>>, Action). -file("src/lustre/attribute.gleam", 1073). ?DOC( " Whether to allow the value to be edited by the user\n" "\n" " - `\"date\"`\n" " - `\"datetime-local\"`\n" " - `\"email\"`\n" " - `\"month\"`\n" " - `\"number\"`\n" " - `\"password\"`\n" " - `\"range\"`\n" " - `\"search\"`\n" " - `\"tel\"`\n" " - `\"text\"`\n" " - `\"time\"`\n" " - `\"url\"`\n" " - `\"week\"`\n" ). -spec readonly(boolean()) -> lustre@vdom@vattr:attribute(any()). readonly(Is_readonly) -> boolean_attribute(<<"readonly"/utf8>>, Is_readonly). -file("src/lustre/attribute.gleam", 1095). ?DOC( " Whether the control is required for form submission\n" "\n" " - `\"checkbox\"`\n" " - `\"date\"`\n" " - `\"datetime-local\"`\n" " - `\"email\"`\n" " - `\"month\"`\n" " - `\"number\"`\n" " - `\"password\"`\n" " - `\"radio\"`\n" " - `\"range\"`\n" " - `\"search\"`\n" " - `\"tel\"`\n" " - `\"text\"`\n" " - `\"time\"`\n" " - `\"url\"`\n" " - `\"week\"`\n" ). -spec required(boolean()) -> lustre@vdom@vattr:attribute(any()). required(Is_required) -> boolean_attribute(<<"required"/utf8>>, Is_required). -file("src/lustre/attribute.gleam", 1103). ?DOC( " Controls whether or not a select's `