Help us shape the future of Go! Take the 2026 Go Developer Survey

attr

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 9, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Accept

func Accept(v string) weaver.Node

Accept sets the accept attribute, defining the types of files that the server accepts.

func AcceptCharset

func AcceptCharset(v string) weaver.Node

AcceptCharset sets the accept-charset attribute, specifying the character encodings used for form submission.

func AccessKey

func AccessKey(v string) weaver.Node

AccessKey sets the accesskey attribute, providing a hint for generating a keyboard shortcut for the element.

func Action

func Action(v string) weaver.Node

Action sets the action attribute, defining the URL that processes the form submission.

func Alt

func Alt(v string) weaver.Node

Alt sets the alt attribute, defining an alternative text description for the element.

func Async

func Async(enabled bool) weaver.Node

Async sets the async attribute, indicating that the script should be executed asynchronously.

func AutoComplete

func AutoComplete(v string) weaver.Node

AutoComplete sets the autocomplete attribute, specifying whether the control's value can be automatically completed by the browser.

func Autocapitalize

func Autocapitalize(v string) weaver.Node

Autocapitalize sets the autocapitalize attribute, controlling whether and how text input is automatically capitalized.

func Autofocus

func Autofocus(enabled bool) weaver.Node

Autofocus sets the autofocus attribute, indicating that the element should be focused on page load.

func Autoplay

func Autoplay(enabled bool) weaver.Node

Autoplay sets the autoplay attribute, specifying that the media should automatically start playing.

func Capture

func Capture(v string) weaver.Node

Capture sets the capture attribute, specifying which camera or microphone to use for media capture.

func Charset

func Charset(v string) weaver.Node

Charset sets the charset attribute, declaring the character encoding of the document.

func Checked

func Checked(enabled bool) weaver.Node

Checked sets the checked attribute, indicating that the checkbox or radio control is checked.

func Cite

func Cite(v string) weaver.Node

Cite sets the cite attribute, specifying a URL that points to the source of a quotation or edit.

func Class

func Class(v string) weaver.Node

Class sets the class attribute, specifying one or more class names for an element.

func ColSpan

func ColSpan(v string) weaver.Node

ColSpan sets the colspan attribute, defining the number of columns a cell should span.

func Cols

func Cols(v string) weaver.Node

Cols sets the cols attribute, specifying the visible width of a text area in average character widths.

func Content

func Content(v string) weaver.Node

Content sets the content attribute, giving the value associated with the http-equiv or name attribute.

func ContentEditable

func ContentEditable(v string) weaver.Node

ContentEditable sets the contenteditable attribute, indicating whether the element's content is editable.

func Controls

func Controls(enabled bool) weaver.Node

Controls sets the controls attribute, displaying playback controls for the media element.

func Coords

func Coords(v string) weaver.Node

Coords sets the coords attribute, defining the coordinates of an image map region.

func CrossOrigin

func CrossOrigin(v string) weaver.Node

CrossOrigin sets the crossorigin attribute, indicating whether the fetch of the resource should be done using a CORS request.

func Data

func Data(key, v string) weaver.Node

Data sets a custom data attribute (`data-*`).

func DateTime

func DateTime(v string) weaver.Node

DateTime sets the datetime attribute, defining a machine-readable date/time string.

func Decoding

func Decoding(v string) weaver.Node

Decoding sets the decoding attribute, providing a hint on how the browser should decode the image.

func Default

func Default(enabled bool) weaver.Node

Default sets the default attribute, specifying that a track is to be enabled if user preferences don't indicate otherwise.

func Defer

func Defer(enabled bool) weaver.Node

Defer sets the defer attribute, indicating that the script should be executed after the document has been parsed.

func Dir

func Dir(v string) weaver.Node

Dir sets the dir attribute, indicating the directionality of the element's text.

func Disabled

func Disabled(enabled bool) weaver.Node

Disabled sets the disabled attribute, indicating that the form control is disabled.

func Download

func Download(v string) weaver.Node

Download sets the download attribute, instructing the browser to download the URL instead of navigating to it.

func Draggable

func Draggable(v string) weaver.Node

Draggable sets the draggable attribute, indicating whether the element can be dragged.

func Enctype

func Enctype(v string) weaver.Node

Enctype sets the enctype attribute, defining the encoding type used when submitting the form.

func EnterKeyHint

func EnterKeyHint(v string) weaver.Node

EnterKeyHint sets the enterkeyhint attribute, defining what action label (or icon) to present for the enter key on virtual keyboards.

func For

func For(v string) weaver.Node

For sets the for attribute, associating the element with another element's ID.

func Form

func Form(v string) weaver.Node

Form sets the form attribute, associating the element with a form element.

func FormAction

func FormAction(v string) weaver.Node

FormAction sets the formaction attribute, specifying the URL that processes form submission for this element.

func FormEnctype

func FormEnctype(v string) weaver.Node

FormEnctype sets the formenctype attribute, specifying the encoding type for form submission for this element.

func FormMethod

func FormMethod(v string) weaver.Node

FormMethod sets the formmethod attribute, specifying the HTTP method for form submission for this element.

func FormNoValidate

func FormNoValidate(enabled bool) weaver.Node

FormNoValidate sets the formnovalidate attribute, indicating that the form shouldn't be validated when submitted by this element.

func FormTarget

func FormTarget(v string) weaver.Node

FormTarget sets the formtarget attribute, specifying where to display the response after submitting the form for this element.

func HTTPEquiv

func HTTPEquiv(v string) weaver.Node

HTTPEquiv sets the http-equiv attribute, defining a pragma directive for processing the document.

func Headers

func Headers(v string) weaver.Node

Headers sets the headers attribute, establishing a relationship between table cells and headers.

func Height

func Height(v string) weaver.Node

Height sets the height attribute, specifying the intrinsic height of the element in pixels.

func Hidden

func Hidden(enabled bool) weaver.Node

Hidden sets the hidden attribute, indicating that the element is not yet, or is no longer, relevant.

func High

func High(v string) weaver.Node

High sets the high attribute, defining the lower bound of the high range for a meter element.

func Href

func Href(v string) weaver.Node

Href sets the href attribute, specifying the URL of a linked resource.

func HrefLang

func HrefLang(v string) weaver.Node

HrefLang sets the hreflang attribute, specifying the human language of the linked resource.

func ID

func ID(v string) weaver.Node

ID sets the id attribute, defining a unique identifier for the element.

func Inert

func Inert(enabled bool) weaver.Node

Inert sets the inert attribute, causing the browser to ignore input events for the element.

func InputMode

func InputMode(v string) weaver.Node

InputMode sets the inputmode attribute, providing a hint as to the type of virtual keyboard configuration to use.

func Integrity

func Integrity(v string) weaver.Node

Integrity sets the integrity attribute, containing inline metadata used to verify the fetched resource.

func IsMap

func IsMap(v string) weaver.Node

IsMap sets the ismap attribute, indicating that the image is a server-side image map.

func Kind

func Kind(v string) weaver.Node

Kind sets the kind attribute, specifying the kind of text track.

func Label

func Label(v string) weaver.Node

Label sets the label attribute, specifying a user-readable title for the track or option group.

func Lang

func Lang(v string) weaver.Node

Lang sets the lang attribute, specifying the primary language for the element's contents.

func List

func List(v string) weaver.Node

List sets the list attribute, identifying the datalist element containing suggested values.

func Loading

func Loading(v string) weaver.Node

Loading sets the loading attribute, indicating how the browser should load the image/iframe.

func Loop

func Loop(v string) weaver.Node

Loop sets the loop attribute, causing the media element to start over when reaching the end.

func Low

func Low(v string) weaver.Node

Low sets the low attribute, defining the upper bound of the low range for a meter element.

func Max

func Max(v string) weaver.Node

Max sets the max attribute, defining the maximum value allowed for the input control.

func MaxLength

func MaxLength(v string) weaver.Node

MaxLength sets the maxlength attribute, defining the maximum number of characters allowed.

func Media

func Media(v string) weaver.Node

Media sets the media attribute, specifying the media type that the linked resource applies to.

func Method

func Method(v string) weaver.Node

Method sets the method attribute, specifying the HTTP method to use when submitting the form.

func Min

func Min(v string) weaver.Node

Min sets the min attribute, defining the minimum value allowed for the input control.

func MinLength

func MinLength(v string) weaver.Node

MinLength sets the minlength attribute, defining the minimum number of characters allowed.

func Multiple

func Multiple(enabled bool) weaver.Node

Multiple sets the multiple attribute, indicating that multiple values can be entered/selected.

func Muted

func Muted(enabled bool) weaver.Node

Muted sets the muted attribute, indicating that the audio output of the media should be silenced.

func Name

func Name(v string) weaver.Node

Name sets the name attribute, defining the name of the element.

func NoModule

func NoModule(v string) weaver.Node

NoModule sets the nomodule attribute, preventing the script from executing in browsers that support ES modules.

func NoValidate

func NoValidate(enabled bool) weaver.Node

NoValidate sets the novalidate attribute, indicating that the form should not be validated when submitted.

func Nonce

func Nonce(v string) weaver.Node

Nonce sets the nonce attribute, defining a cryptographic nonce used by Content Security Policy.

func Open

func Open(enabled bool) weaver.Node

Open sets the open attribute, indicating that the disclosure widget is currently visible.

func Optimum

func Optimum(v string) weaver.Node

Optimum sets the optimum attribute, defining the optimal numeric value for a meter element.

func Pattern

func Pattern(v string) weaver.Node

Pattern sets the pattern attribute, specifying a regular expression that the control's value must match.

func Ping

func Ping(v string) weaver.Node

Ping sets the ping attribute, specifying a space-separated list of URLs to be notified if the user follows the hyperlink.

func Placeholder

func Placeholder(v string) weaver.Node

Placeholder sets the placeholder attribute, giving a hint to the user of what can be entered in the control.

func PlaysInline

func PlaysInline(enabled bool) weaver.Node

PlaysInline sets the playsinline attribute, specifying that video should play inline within the element's playback area.

func Popover

func Popover(v string) weaver.Node

Popover sets the popover attribute, turning an element into a popover element.

func Poster

func Poster(v string) weaver.Node

Poster sets the poster attribute, specifying an image to be shown while the video is downloading.

func Preload

func Preload(v string) weaver.Node

Preload sets the preload attribute, providing a hint to the browser about how the media should be loaded.

func ReadOnly

func ReadOnly(enabled bool) weaver.Node

ReadOnly sets the readonly attribute, indicating that the form control cannot be edited by the user.

func ReferrerPolicy

func ReferrerPolicy(v string) weaver.Node

ReferrerPolicy sets the referrerpolicy attribute, specifying which referrer to use when fetching the resource.

func Rel

func Rel(v string) weaver.Node

Rel sets the rel attribute, specifying the relationship of the linked document to the current document.

func Required

func Required(enabled bool) weaver.Node

Required sets the required attribute, indicating that the user must specify a value for the input before submitting the form.

func Reversed

func Reversed(enabled bool) weaver.Node

Reversed sets the reversed attribute, specifying that list items should be numbered in reverse order.

func RowSpan

func RowSpan(v string) weaver.Node

RowSpan sets the rowspan attribute, defining the number of rows a cell should span.

func Rows

func Rows(v string) weaver.Node

Rows sets the rows attribute, specifying the visible height of a text area in lines.

func Sandbox

func Sandbox(v string) weaver.Node

Sandbox sets the sandbox attribute, applying extra restrictions to the content in the iframe.

func Scope

func Scope(v string) weaver.Node

Scope sets the scope attribute, defining the cells that the header element relates to.

func Selected

func Selected(enabled bool) weaver.Node

Selected sets the selected attribute, indicating that the option is currently selected.

func Shape

func Shape(v string) weaver.Node

Shape sets the shape attribute, defining the shape of an image map region.

func Size

func Size(v string) weaver.Node

Size sets the size attribute, defining the initial size or width of the control.

func Sizes

func Sizes(v string) weaver.Node

Sizes sets the sizes attribute, defining source sizes for responsive image selection.

func Span

func Span(v string) weaver.Node

Span sets the span attribute, specifying the number of columns/groups an element spans.

func Spellcheck

func Spellcheck(v string) weaver.Node

Spellcheck sets the spellcheck attribute, defining whether the element may be checked for spelling errors.

func Src

func Src(v string) weaver.Node

Src sets the src attribute, specifying the URL of an external resource to embed.

func SrcDoc

func SrcDoc(v string) weaver.Node

SrcDoc sets the srcdoc attribute, specifying the HTML content of the page to show in the inline frame.

func SrcLang

func SrcLang(v string) weaver.Node

SrcLang sets the srclang attribute, specifying the language of the track text data.

func SrcSet

func SrcSet(v string) weaver.Node

SrcSet sets the srcset attribute, defining a list of image candidates for varying display densities or screens.

func Start

func Start(v string) weaver.Node

Start sets the start attribute, defining the starting value of an ordered list.

func Step

func Step(v string) weaver.Node

Step sets the step attribute, defining the legal number intervals for an input field.

func Style

func Style(v string) weaver.Node

Style sets the style attribute, containing CSS styling declarations to be applied to the element.

func TabIndex

func TabIndex(v string) weaver.Node

TabIndex sets the tabindex attribute, indicating if the element can take input focus.

func Target

func Target(v string) weaver.Node

Target sets the target attribute, specifying where to display the linked URL.

func Title

func Title(v string) weaver.Node

Title sets the title attribute, containing text representing advisory information related to the element.

func Translate

func Translate(v string) weaver.Node

Translate sets the translate attribute, specifying whether an element's attribute values and direct text child nodes should be translated.

func Type

func Type(v string) weaver.Node

Type sets the type attribute, specifying the type of element or input control.

func UseMap

func UseMap(v string) weaver.Node

UseMap sets the usemap attribute, associating the image with a client-side image map.

func Value

func Value(v string) weaver.Node

Value sets the value attribute, defining the initial value of the element.

func Width

func Width(v string) weaver.Node

Width sets the width attribute, specifying the intrinsic width of the element in pixels.

func Wrap

func Wrap(v string) weaver.Node

Wrap sets the wrap attribute, indicating how text in a text area should be wrapped upon submission.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL