Expand description
Create html attributes
Re-exports§
pub use crate::vdom::EventCallback;
pub use crate::vdom::Style;
pub use crate::vdom::key;
pub use crate::vdom::replace;
pub use crate::vdom::skip;
pub use crate::vdom::skip_criteria;
pub use crate::dom::Event;
pub use crate::vdom::Attribute;
Modules§
- commons
- common used html attributes
Macros§
- declare_
attributes - declare a function with the name corresponds to attribute name for easy usage in html elements Example:
Constants§
- HTML_
ATTRS - These are most commonly used html attributes such as class, id, etc
- HTML_
ATTRS_ NON_ COMMON - These are html attributes with names that are non proper rust identifier therefore handled differently. ie: (for, in)
- HTML_
ATTRS_ SPECIAL - These are html attributes with names that are non proper rust identifier therefore handled differently. ie: (for, in)
Functions§
- accept
- Creates html accept attribute
- accept_
charset - Creates html accept-charset attribute
- accesskey
- Creates html accesskey attribute
- action
- Creates html action attribute
- align
- Creates html align attribute
- allow
- Creates html allow attribute
- alt
- Creates html alt attribute
- async
- Creates html async attribute
- attr
- a utility function to convert simple value into attribute
- attrs_
flag - A helper function for setting attributes with no values such as checked in checkbox input type This is best called to be appended to the node since this returns an array of attributes which doesn’t play well with the others
- autocapitalize
- Creates html autocapitalize attribute
- autocomplete
- Creates html autocomplete attribute
- autofocus
- Creates html autofocus attribute
- autoplay
- Creates html autoplay attribute
- background
- Creates html background attribute
- bgcolor
- Creates html bgcolor attribute
- border
- Creates html border attribute
- buffered
- Creates html buffered attribute
- challenge
- Creates html challenge attribute
- charset
- Creates html charset attribute
- checked
- set the checked value, used checkbox and radio buttons
- cite
- Creates html cite attribute
- class
- Creates html class attribute
- classes
- a helper function to add multiple classes to a node
- classes_
flag - A helper function which takes an array of tuple of class and a flag. The final class is assembled using only the values that has a flag which evaluates to true.
- codebase
- Creates html codebase attribute
- color
- Creates html color attribute
- cols
- Creates html cols attribute
- colspan
- Creates html colspan attribute
- content
- Creates html content attribute
- contenteditable
- Creates html contenteditable attribute
- contextmenu
- Creates html contextmenu attribute
- controls
- Creates html controls attribute
- coords
- Creates html coords attribute
- crossorigin
- Creates html crossorigin attribute
- csp
- Creates html csp attribute
- data
- Creates html data attribute
- datetime
- Creates html datetime attribute
- decoding
- Creates html decoding attribute
- default
- Creates html default attribute
- defer
- Creates html defer attribute
- dir
- Creates html dir attribute
- dirname
- Creates html dirname attribute
- disabled
- set whether an element is disabled or not
- download
- Creates html download attribute
- draggable
- Creates html draggable attribute
- dropzone
- Creates html dropzone attribute
- empty_
attr - a utility function to return create an empty attr, useful for cases where branch expression need to return an attribute which otherwise it can not produce example:
- enctype
- Creates html enctype attribute
- enterkeyhint
- Creates html enterkeyhint attribute
- flex_
direction - Creates html flex-direction attribute
- focus
- focus the html element
- font_
family - Creates html font-family attribute
- font_
size - Creates html font-size attribute
- for
- Creates html for attribute
- formaction
- Creates html formaction attribute
- formnovalidate
- Creates html formnovalidate attribute
- headers
- Creates html headers attribute
- height
- Creates html height attribute
- hidden
- Creates html hidden attribute
- high
- Creates html high attribute
- href
- Creates html href attribute
- hreflang
- Creates html hreflang attribute
- http
- Creates html http attribute
- icon
- Creates html icon attribute
- id
- Creates html id attribute
- importance
- Creates html importance attribute
- inputmode
- Creates html inputmode attribute
- integrity
- Creates html integrity attribute
- intrinsicsize
- Creates html intrinsicsize attribute
- ismap
- Creates html ismap attribute
- itemprop
- Creates html itemprop attribute
- keytype
- Creates html keytype attribute
- kind
- Creates html kind attribute
- lang
- Creates html lang attribute
- language
- Creates html language attribute
- list
- Creates html list attribute
- loading
- Creates html loading attribute
- loop
- Creates html loop attribute
- low
- Creates html low attribute
- manifest
- Creates html manifest attribute
- max
- Creates html max attribute
- maxlength
- Creates html maxlength attribute
- maybe_
attr - Set the attribute of this element if value is Some, empty attribute otherwise
- media
- Creates html media attribute
- method
- Creates html method attribute
- min
- Creates html min attribute
- minlength
- Creates html minlength attribute
- multiple
- Creates html multiple attribute
- muted
- Creates html muted attribute
- name
- Creates html name attribute
- novalidate
- Creates html novalidate attribute
- open
- set whether an element, ie: details, that is the contents of the details are currently visible
- optimum
- Creates html optimum attribute
- pattern
- Creates html pattern attribute
- ping
- Creates html ping attribute
- placeholder
- Creates html placeholder attribute
- poster
- Creates html poster attribute
- preload
- Creates html preload attribute
- radiogroup
- Creates html radiogroup attribute
- readonly
- Creates html readonly attribute
- referrerpolicy
- Creates html referrerpolicy attribute
- rel
- Creates html rel attribute
- required
- Creates html required attribute
- reversed
- Creates html reversed attribute
- rows
- Creates html rows attribute
- rowspan
- Creates html rowspan attribute
- sandbox
- Creates html sandbox attribute
- scope
- Creates html scope attribute
- scoped
- Creates html scoped attribute
- selected
- Creates html selected attribute
- shape
- Creates html shape attribute
- size
- Creates html size attribute
- sizes
- Creates html sizes attribute
- slot
- Creates html slot attribute
- spellcheck
- Creates html spellcheck attribute
- src
- Creates html src attribute
- srcdoc
- Creates html srcdoc attribute
- srclang
- Creates html srclang attribute
- srcset
- Creates html srcset attribute
- start
- Creates html start attribute
- step
- Creates html step attribute
- styles
- A helper function which creates a style attribute by assembling the tuples into a string for the style value.
- styles_
flag - A helper function which creates a style attribute by assembling only the parts that passed the boolean flag.
- styles_
values - A helper function to build styles by accepting pairs
- summary
- Creates html summary attribute
- tabindex
- Creates html tabindex attribute
- target
- Creates html target attribute
- title
- Creates html title attribute
- translate
- Creates html translate attribute
- type
- Creates html type attribute
- usemap
- Creates html usemap attribute
- value
- Creates html value attribute
- width
- Creates html width attribute
- wrap
- Creates html wrap attribute