html_compose.attributes.button_attrs
1from . import BaseAttribute 2from typing import Literal 3from ..base_types import StrLike 4 5 6class ButtonAttrs: 7 """ 8 This module contains functions for attributes in the 'button' element. 9 Which is inherited by a class so we can generate type hints 10 """ 11 12 @staticmethod 13 def disabled(value: bool) -> BaseAttribute: 14 """ 15 "button" attribute: disabled 16 Whether the form control is disabled 17 18 Args: 19 value: 20 Boolean attribute 21 22 Returns: 23 An disabled attribute to be added to your element 24 25 """ 26 27 return BaseAttribute("disabled", value) 28 29 @staticmethod 30 def form(value) -> BaseAttribute: 31 """ 32 "button" attribute: form 33 Associates the element with a form element 34 35 Args: 36 value: 37 ID* 38 39 Returns: 40 An form attribute to be added to your element 41 42 """ 43 44 return BaseAttribute("form", value) 45 46 @staticmethod 47 def formaction(value) -> BaseAttribute: 48 """ 49 "button" attribute: formaction 50 URL to use for form submission 51 52 Args: 53 value: 54 Valid non-empty URL potentially surrounded by spaces 55 56 Returns: 57 An formaction attribute to be added to your element 58 59 """ 60 61 return BaseAttribute("formaction", value) 62 63 @staticmethod 64 def formenctype( 65 value: Literal[ 66 "application/x-www-form-urlencoded", 67 "multipart/form-data", 68 "text/plain", 69 ], 70 ) -> BaseAttribute: 71 """ 72 "button" attribute: formenctype 73 Entry list encoding type to use for form submission 74 75 Args: 76 value: 77 ['application/x-www-form-urlencoded', 'multipart/form-data', 'text/plain'] 78 79 Returns: 80 An formenctype attribute to be added to your element 81 82 """ 83 84 return BaseAttribute("formenctype", value) 85 86 @staticmethod 87 def formmethod(value: Literal["GET", "POST", "dialog"]) -> BaseAttribute: 88 """ 89 "button" attribute: formmethod 90 Variant to use for form submission 91 92 Args: 93 value: 94 ['GET', 'POST', 'dialog'] 95 96 Returns: 97 An formmethod attribute to be added to your element 98 99 """ 100 101 return BaseAttribute("formmethod", value) 102 103 @staticmethod 104 def formnovalidate(value: bool) -> BaseAttribute: 105 """ 106 "button" attribute: formnovalidate 107 Bypass form control validation for form submission 108 109 Args: 110 value: 111 Boolean attribute 112 113 Returns: 114 An formnovalidate attribute to be added to your element 115 116 """ 117 118 return BaseAttribute("formnovalidate", value) 119 120 @staticmethod 121 def formtarget(value) -> BaseAttribute: 122 """ 123 "button" attribute: formtarget 124 Navigable for form submission 125 126 Args: 127 value: 128 Valid navigable target name or keyword 129 130 Returns: 131 An formtarget attribute to be added to your element 132 133 """ 134 135 return BaseAttribute("formtarget", value) 136 137 @staticmethod 138 def name(value: StrLike) -> BaseAttribute: 139 """ 140 "button" attribute: name 141 Name of the element to use for form submission and in the form.elements API 142 143 Args: 144 value: 145 Text* 146 147 Returns: 148 An name attribute to be added to your element 149 150 """ 151 152 return BaseAttribute("name", value) 153 154 @staticmethod 155 def popovertarget(value) -> BaseAttribute: 156 """ 157 "button" attribute: popovertarget 158 Targets a popover element to toggle, show, or hide 159 160 Args: 161 value: 162 ID* 163 164 Returns: 165 An popovertarget attribute to be added to your element 166 167 """ 168 169 return BaseAttribute("popovertarget", value) 170 171 @staticmethod 172 def popovertargetaction( 173 value: Literal["toggle", "show", "hide"], 174 ) -> BaseAttribute: 175 """ 176 "button" attribute: popovertargetaction 177 Indicates whether a targeted popover element is to be toggled, shown, or hidden 178 179 Args: 180 value: 181 ['toggle', 'show', 'hide'] 182 183 Returns: 184 An popovertargetaction attribute to be added to your element 185 186 """ 187 188 return BaseAttribute("popovertargetaction", value) 189 190 @staticmethod 191 def type(value: Literal["submit", "reset", "button"]) -> BaseAttribute: 192 """ 193 "button" attribute: type 194 Type of button 195 196 Args: 197 value: 198 ['submit', 'reset', 'button'] 199 200 Returns: 201 An type attribute to be added to your element 202 203 """ 204 205 return BaseAttribute("type", value) 206 207 @staticmethod 208 def value(value: StrLike) -> BaseAttribute: 209 """ 210 "button" attribute: value 211 Value to be used for form submission 212 213 Args: 214 value: 215 Text 216 217 Returns: 218 An value attribute to be added to your element 219 220 """ 221 222 return BaseAttribute("value", value)
7class ButtonAttrs: 8 """ 9 This module contains functions for attributes in the 'button' element. 10 Which is inherited by a class so we can generate type hints 11 """ 12 13 @staticmethod 14 def disabled(value: bool) -> BaseAttribute: 15 """ 16 "button" attribute: disabled 17 Whether the form control is disabled 18 19 Args: 20 value: 21 Boolean attribute 22 23 Returns: 24 An disabled attribute to be added to your element 25 26 """ 27 28 return BaseAttribute("disabled", value) 29 30 @staticmethod 31 def form(value) -> BaseAttribute: 32 """ 33 "button" attribute: form 34 Associates the element with a form element 35 36 Args: 37 value: 38 ID* 39 40 Returns: 41 An form attribute to be added to your element 42 43 """ 44 45 return BaseAttribute("form", value) 46 47 @staticmethod 48 def formaction(value) -> BaseAttribute: 49 """ 50 "button" attribute: formaction 51 URL to use for form submission 52 53 Args: 54 value: 55 Valid non-empty URL potentially surrounded by spaces 56 57 Returns: 58 An formaction attribute to be added to your element 59 60 """ 61 62 return BaseAttribute("formaction", value) 63 64 @staticmethod 65 def formenctype( 66 value: Literal[ 67 "application/x-www-form-urlencoded", 68 "multipart/form-data", 69 "text/plain", 70 ], 71 ) -> BaseAttribute: 72 """ 73 "button" attribute: formenctype 74 Entry list encoding type to use for form submission 75 76 Args: 77 value: 78 ['application/x-www-form-urlencoded', 'multipart/form-data', 'text/plain'] 79 80 Returns: 81 An formenctype attribute to be added to your element 82 83 """ 84 85 return BaseAttribute("formenctype", value) 86 87 @staticmethod 88 def formmethod(value: Literal["GET", "POST", "dialog"]) -> BaseAttribute: 89 """ 90 "button" attribute: formmethod 91 Variant to use for form submission 92 93 Args: 94 value: 95 ['GET', 'POST', 'dialog'] 96 97 Returns: 98 An formmethod attribute to be added to your element 99 100 """ 101 102 return BaseAttribute("formmethod", value) 103 104 @staticmethod 105 def formnovalidate(value: bool) -> BaseAttribute: 106 """ 107 "button" attribute: formnovalidate 108 Bypass form control validation for form submission 109 110 Args: 111 value: 112 Boolean attribute 113 114 Returns: 115 An formnovalidate attribute to be added to your element 116 117 """ 118 119 return BaseAttribute("formnovalidate", value) 120 121 @staticmethod 122 def formtarget(value) -> BaseAttribute: 123 """ 124 "button" attribute: formtarget 125 Navigable for form submission 126 127 Args: 128 value: 129 Valid navigable target name or keyword 130 131 Returns: 132 An formtarget attribute to be added to your element 133 134 """ 135 136 return BaseAttribute("formtarget", value) 137 138 @staticmethod 139 def name(value: StrLike) -> BaseAttribute: 140 """ 141 "button" attribute: name 142 Name of the element to use for form submission and in the form.elements API 143 144 Args: 145 value: 146 Text* 147 148 Returns: 149 An name attribute to be added to your element 150 151 """ 152 153 return BaseAttribute("name", value) 154 155 @staticmethod 156 def popovertarget(value) -> BaseAttribute: 157 """ 158 "button" attribute: popovertarget 159 Targets a popover element to toggle, show, or hide 160 161 Args: 162 value: 163 ID* 164 165 Returns: 166 An popovertarget attribute to be added to your element 167 168 """ 169 170 return BaseAttribute("popovertarget", value) 171 172 @staticmethod 173 def popovertargetaction( 174 value: Literal["toggle", "show", "hide"], 175 ) -> BaseAttribute: 176 """ 177 "button" attribute: popovertargetaction 178 Indicates whether a targeted popover element is to be toggled, shown, or hidden 179 180 Args: 181 value: 182 ['toggle', 'show', 'hide'] 183 184 Returns: 185 An popovertargetaction attribute to be added to your element 186 187 """ 188 189 return BaseAttribute("popovertargetaction", value) 190 191 @staticmethod 192 def type(value: Literal["submit", "reset", "button"]) -> BaseAttribute: 193 """ 194 "button" attribute: type 195 Type of button 196 197 Args: 198 value: 199 ['submit', 'reset', 'button'] 200 201 Returns: 202 An type attribute to be added to your element 203 204 """ 205 206 return BaseAttribute("type", value) 207 208 @staticmethod 209 def value(value: StrLike) -> BaseAttribute: 210 """ 211 "button" attribute: value 212 Value to be used for form submission 213 214 Args: 215 value: 216 Text 217 218 Returns: 219 An value attribute to be added to your element 220 221 """ 222 223 return BaseAttribute("value", value)
This module contains functions for attributes in the 'button' element. Which is inherited by a class so we can generate type hints
13 @staticmethod 14 def disabled(value: bool) -> BaseAttribute: 15 """ 16 "button" attribute: disabled 17 Whether the form control is disabled 18 19 Args: 20 value: 21 Boolean attribute 22 23 Returns: 24 An disabled attribute to be added to your element 25 26 """ 27 28 return BaseAttribute("disabled", value)
"button" attribute: disabled Whether the form control is disabled
Args: value: Boolean attribute
Returns: An disabled attribute to be added to your element
30 @staticmethod 31 def form(value) -> BaseAttribute: 32 """ 33 "button" attribute: form 34 Associates the element with a form element 35 36 Args: 37 value: 38 ID* 39 40 Returns: 41 An form attribute to be added to your element 42 43 """ 44 45 return BaseAttribute("form", value)
"button" attribute: form Associates the element with a form element
Args: value: ID*
Returns: An form attribute to be added to your element
47 @staticmethod 48 def formaction(value) -> BaseAttribute: 49 """ 50 "button" attribute: formaction 51 URL to use for form submission 52 53 Args: 54 value: 55 Valid non-empty URL potentially surrounded by spaces 56 57 Returns: 58 An formaction attribute to be added to your element 59 60 """ 61 62 return BaseAttribute("formaction", value)
"button" attribute: formaction URL to use for form submission
Args: value: Valid non-empty URL potentially surrounded by spaces
Returns: An formaction attribute to be added to your element
64 @staticmethod 65 def formenctype( 66 value: Literal[ 67 "application/x-www-form-urlencoded", 68 "multipart/form-data", 69 "text/plain", 70 ], 71 ) -> BaseAttribute: 72 """ 73 "button" attribute: formenctype 74 Entry list encoding type to use for form submission 75 76 Args: 77 value: 78 ['application/x-www-form-urlencoded', 'multipart/form-data', 'text/plain'] 79 80 Returns: 81 An formenctype attribute to be added to your element 82 83 """ 84 85 return BaseAttribute("formenctype", value)
"button" attribute: formenctype Entry list encoding type to use for form submission
Args: value: ['application/x-www-form-urlencoded', 'multipart/form-data', 'text/plain']
Returns: An formenctype attribute to be added to your element
87 @staticmethod 88 def formmethod(value: Literal["GET", "POST", "dialog"]) -> BaseAttribute: 89 """ 90 "button" attribute: formmethod 91 Variant to use for form submission 92 93 Args: 94 value: 95 ['GET', 'POST', 'dialog'] 96 97 Returns: 98 An formmethod attribute to be added to your element 99 100 """ 101 102 return BaseAttribute("formmethod", value)
"button" attribute: formmethod Variant to use for form submission
Args: value: ['GET', 'POST', 'dialog']
Returns: An formmethod attribute to be added to your element
104 @staticmethod 105 def formnovalidate(value: bool) -> BaseAttribute: 106 """ 107 "button" attribute: formnovalidate 108 Bypass form control validation for form submission 109 110 Args: 111 value: 112 Boolean attribute 113 114 Returns: 115 An formnovalidate attribute to be added to your element 116 117 """ 118 119 return BaseAttribute("formnovalidate", value)
"button" attribute: formnovalidate Bypass form control validation for form submission
Args: value: Boolean attribute
Returns: An formnovalidate attribute to be added to your element
121 @staticmethod 122 def formtarget(value) -> BaseAttribute: 123 """ 124 "button" attribute: formtarget 125 Navigable for form submission 126 127 Args: 128 value: 129 Valid navigable target name or keyword 130 131 Returns: 132 An formtarget attribute to be added to your element 133 134 """ 135 136 return BaseAttribute("formtarget", value)
"button" attribute: formtarget Navigable for form submission
Args: value: Valid navigable target name or keyword
Returns: An formtarget attribute to be added to your element
138 @staticmethod 139 def name(value: StrLike) -> BaseAttribute: 140 """ 141 "button" attribute: name 142 Name of the element to use for form submission and in the form.elements API 143 144 Args: 145 value: 146 Text* 147 148 Returns: 149 An name attribute to be added to your element 150 151 """ 152 153 return BaseAttribute("name", value)
"button" attribute: name Name of the element to use for form submission and in the form.elements API
Args: value: Text*
Returns: An name attribute to be added to your element
155 @staticmethod 156 def popovertarget(value) -> BaseAttribute: 157 """ 158 "button" attribute: popovertarget 159 Targets a popover element to toggle, show, or hide 160 161 Args: 162 value: 163 ID* 164 165 Returns: 166 An popovertarget attribute to be added to your element 167 168 """ 169 170 return BaseAttribute("popovertarget", value)
"button" attribute: popovertarget Targets a popover element to toggle, show, or hide
Args: value: ID*
Returns: An popovertarget attribute to be added to your element
172 @staticmethod 173 def popovertargetaction( 174 value: Literal["toggle", "show", "hide"], 175 ) -> BaseAttribute: 176 """ 177 "button" attribute: popovertargetaction 178 Indicates whether a targeted popover element is to be toggled, shown, or hidden 179 180 Args: 181 value: 182 ['toggle', 'show', 'hide'] 183 184 Returns: 185 An popovertargetaction attribute to be added to your element 186 187 """ 188 189 return BaseAttribute("popovertargetaction", value)
"button" attribute: popovertargetaction Indicates whether a targeted popover element is to be toggled, shown, or hidden
Args: value: ['toggle', 'show', 'hide']
Returns: An popovertargetaction attribute to be added to your element
191 @staticmethod 192 def type(value: Literal["submit", "reset", "button"]) -> BaseAttribute: 193 """ 194 "button" attribute: type 195 Type of button 196 197 Args: 198 value: 199 ['submit', 'reset', 'button'] 200 201 Returns: 202 An type attribute to be added to your element 203 204 """ 205 206 return BaseAttribute("type", value)
"button" attribute: type Type of button
Args: value: ['submit', 'reset', 'button']
Returns: An type attribute to be added to your element
208 @staticmethod 209 def value(value: StrLike) -> BaseAttribute: 210 """ 211 "button" attribute: value 212 Value to be used for form submission 213 214 Args: 215 value: 216 Text 217 218 Returns: 219 An value attribute to be added to your element 220 221 """ 222 223 return BaseAttribute("value", value)
"button" attribute: value Value to be used for form submission
Args: value: Text
Returns: An value attribute to be added to your element