html_compose.attributes.textarea_attrs
1from . import BaseAttribute 2from typing import Literal 3from ..base_types import StrLike 4 5 6class TextareaAttrs: 7 """ 8 This module contains functions for attributes in the 'textarea' element. 9 Which is inherited by a class so we can generate type hints 10 """ 11 12 @staticmethod 13 def autocomplete(value) -> BaseAttribute: 14 """ 15 "textarea" attribute: autocomplete 16 Hint for form autofill feature 17 18 Args: 19 value: 20 Autofill field name and related tokens* 21 22 Returns: 23 An autocomplete attribute to be added to your element 24 25 """ 26 27 return BaseAttribute("autocomplete", value) 28 29 @staticmethod 30 def cols(value) -> BaseAttribute: 31 """ 32 "textarea" attribute: cols 33 Maximum number of characters per line 34 35 Args: 36 value: 37 Valid non-negative integer greater than zero 38 39 Returns: 40 An cols attribute to be added to your element 41 42 """ 43 44 return BaseAttribute("cols", value) 45 46 @staticmethod 47 def dirname(value: StrLike) -> BaseAttribute: 48 """ 49 "textarea" attribute: dirname 50 Name of form control to use for sending the element's directionality in form submission 51 52 Args: 53 value: 54 Text* 55 56 Returns: 57 An dirname attribute to be added to your element 58 59 """ 60 61 return BaseAttribute("dirname", value) 62 63 @staticmethod 64 def disabled(value: bool) -> BaseAttribute: 65 """ 66 "textarea" attribute: disabled 67 Whether the form control is disabled 68 69 Args: 70 value: 71 Boolean attribute 72 73 Returns: 74 An disabled attribute to be added to your element 75 76 """ 77 78 return BaseAttribute("disabled", value) 79 80 @staticmethod 81 def form(value) -> BaseAttribute: 82 """ 83 "textarea" attribute: form 84 Associates the element with a form element 85 86 Args: 87 value: 88 ID* 89 90 Returns: 91 An form attribute to be added to your element 92 93 """ 94 95 return BaseAttribute("form", value) 96 97 @staticmethod 98 def maxlength(value: int) -> BaseAttribute: 99 """ 100 "textarea" attribute: maxlength 101 Maximum length of value 102 103 Args: 104 value: 105 Valid non-negative integer 106 107 Returns: 108 An maxlength attribute to be added to your element 109 110 """ 111 112 return BaseAttribute("maxlength", value) 113 114 @staticmethod 115 def minlength(value: int) -> BaseAttribute: 116 """ 117 "textarea" attribute: minlength 118 Minimum length of value 119 120 Args: 121 value: 122 Valid non-negative integer 123 124 Returns: 125 An minlength attribute to be added to your element 126 127 """ 128 129 return BaseAttribute("minlength", value) 130 131 @staticmethod 132 def name(value: StrLike) -> BaseAttribute: 133 """ 134 "textarea" attribute: name 135 Name of the element to use for form submission and in the form.elements API 136 137 Args: 138 value: 139 Text* 140 141 Returns: 142 An name attribute to be added to your element 143 144 """ 145 146 return BaseAttribute("name", value) 147 148 @staticmethod 149 def placeholder(value: StrLike) -> BaseAttribute: 150 """ 151 "textarea" attribute: placeholder 152 User-visible label to be placed within the form control 153 154 Args: 155 value: 156 Text* 157 158 Returns: 159 An placeholder attribute to be added to your element 160 161 """ 162 163 return BaseAttribute("placeholder", value) 164 165 @staticmethod 166 def readonly(value: bool) -> BaseAttribute: 167 """ 168 "textarea" attribute: readonly 169 Whether to allow the value to be edited by the user 170 171 Args: 172 value: 173 Boolean attribute 174 175 Returns: 176 An readonly attribute to be added to your element 177 178 """ 179 180 return BaseAttribute("readonly", value) 181 182 @staticmethod 183 def required(value: bool) -> BaseAttribute: 184 """ 185 "textarea" attribute: required 186 Whether the control is required for form submission 187 188 Args: 189 value: 190 Boolean attribute 191 192 Returns: 193 An required attribute to be added to your element 194 195 """ 196 197 return BaseAttribute("required", value) 198 199 @staticmethod 200 def rows(value) -> BaseAttribute: 201 """ 202 "textarea" attribute: rows 203 Number of lines to show 204 205 Args: 206 value: 207 Valid non-negative integer greater than zero 208 209 Returns: 210 An rows attribute to be added to your element 211 212 """ 213 214 return BaseAttribute("rows", value) 215 216 @staticmethod 217 def wrap(value: Literal["soft", "hard"]) -> BaseAttribute: 218 """ 219 "textarea" attribute: wrap 220 How the value of the form control is to be wrapped for form submission 221 222 Args: 223 value: 224 ['soft', 'hard'] 225 226 Returns: 227 An wrap attribute to be added to your element 228 229 """ 230 231 return BaseAttribute("wrap", value)
7class TextareaAttrs: 8 """ 9 This module contains functions for attributes in the 'textarea' element. 10 Which is inherited by a class so we can generate type hints 11 """ 12 13 @staticmethod 14 def autocomplete(value) -> BaseAttribute: 15 """ 16 "textarea" attribute: autocomplete 17 Hint for form autofill feature 18 19 Args: 20 value: 21 Autofill field name and related tokens* 22 23 Returns: 24 An autocomplete attribute to be added to your element 25 26 """ 27 28 return BaseAttribute("autocomplete", value) 29 30 @staticmethod 31 def cols(value) -> BaseAttribute: 32 """ 33 "textarea" attribute: cols 34 Maximum number of characters per line 35 36 Args: 37 value: 38 Valid non-negative integer greater than zero 39 40 Returns: 41 An cols attribute to be added to your element 42 43 """ 44 45 return BaseAttribute("cols", value) 46 47 @staticmethod 48 def dirname(value: StrLike) -> BaseAttribute: 49 """ 50 "textarea" attribute: dirname 51 Name of form control to use for sending the element's directionality in form submission 52 53 Args: 54 value: 55 Text* 56 57 Returns: 58 An dirname attribute to be added to your element 59 60 """ 61 62 return BaseAttribute("dirname", value) 63 64 @staticmethod 65 def disabled(value: bool) -> BaseAttribute: 66 """ 67 "textarea" attribute: disabled 68 Whether the form control is disabled 69 70 Args: 71 value: 72 Boolean attribute 73 74 Returns: 75 An disabled attribute to be added to your element 76 77 """ 78 79 return BaseAttribute("disabled", value) 80 81 @staticmethod 82 def form(value) -> BaseAttribute: 83 """ 84 "textarea" attribute: form 85 Associates the element with a form element 86 87 Args: 88 value: 89 ID* 90 91 Returns: 92 An form attribute to be added to your element 93 94 """ 95 96 return BaseAttribute("form", value) 97 98 @staticmethod 99 def maxlength(value: int) -> BaseAttribute: 100 """ 101 "textarea" attribute: maxlength 102 Maximum length of value 103 104 Args: 105 value: 106 Valid non-negative integer 107 108 Returns: 109 An maxlength attribute to be added to your element 110 111 """ 112 113 return BaseAttribute("maxlength", value) 114 115 @staticmethod 116 def minlength(value: int) -> BaseAttribute: 117 """ 118 "textarea" attribute: minlength 119 Minimum length of value 120 121 Args: 122 value: 123 Valid non-negative integer 124 125 Returns: 126 An minlength attribute to be added to your element 127 128 """ 129 130 return BaseAttribute("minlength", value) 131 132 @staticmethod 133 def name(value: StrLike) -> BaseAttribute: 134 """ 135 "textarea" attribute: name 136 Name of the element to use for form submission and in the form.elements API 137 138 Args: 139 value: 140 Text* 141 142 Returns: 143 An name attribute to be added to your element 144 145 """ 146 147 return BaseAttribute("name", value) 148 149 @staticmethod 150 def placeholder(value: StrLike) -> BaseAttribute: 151 """ 152 "textarea" attribute: placeholder 153 User-visible label to be placed within the form control 154 155 Args: 156 value: 157 Text* 158 159 Returns: 160 An placeholder attribute to be added to your element 161 162 """ 163 164 return BaseAttribute("placeholder", value) 165 166 @staticmethod 167 def readonly(value: bool) -> BaseAttribute: 168 """ 169 "textarea" attribute: readonly 170 Whether to allow the value to be edited by the user 171 172 Args: 173 value: 174 Boolean attribute 175 176 Returns: 177 An readonly attribute to be added to your element 178 179 """ 180 181 return BaseAttribute("readonly", value) 182 183 @staticmethod 184 def required(value: bool) -> BaseAttribute: 185 """ 186 "textarea" attribute: required 187 Whether the control is required for form submission 188 189 Args: 190 value: 191 Boolean attribute 192 193 Returns: 194 An required attribute to be added to your element 195 196 """ 197 198 return BaseAttribute("required", value) 199 200 @staticmethod 201 def rows(value) -> BaseAttribute: 202 """ 203 "textarea" attribute: rows 204 Number of lines to show 205 206 Args: 207 value: 208 Valid non-negative integer greater than zero 209 210 Returns: 211 An rows attribute to be added to your element 212 213 """ 214 215 return BaseAttribute("rows", value) 216 217 @staticmethod 218 def wrap(value: Literal["soft", "hard"]) -> BaseAttribute: 219 """ 220 "textarea" attribute: wrap 221 How the value of the form control is to be wrapped for form submission 222 223 Args: 224 value: 225 ['soft', 'hard'] 226 227 Returns: 228 An wrap attribute to be added to your element 229 230 """ 231 232 return BaseAttribute("wrap", value)
This module contains functions for attributes in the 'textarea' element. Which is inherited by a class so we can generate type hints
13 @staticmethod 14 def autocomplete(value) -> BaseAttribute: 15 """ 16 "textarea" attribute: autocomplete 17 Hint for form autofill feature 18 19 Args: 20 value: 21 Autofill field name and related tokens* 22 23 Returns: 24 An autocomplete attribute to be added to your element 25 26 """ 27 28 return BaseAttribute("autocomplete", value)
"textarea" attribute: autocomplete Hint for form autofill feature
Args: value: Autofill field name and related tokens*
Returns: An autocomplete attribute to be added to your element
30 @staticmethod 31 def cols(value) -> BaseAttribute: 32 """ 33 "textarea" attribute: cols 34 Maximum number of characters per line 35 36 Args: 37 value: 38 Valid non-negative integer greater than zero 39 40 Returns: 41 An cols attribute to be added to your element 42 43 """ 44 45 return BaseAttribute("cols", value)
"textarea" attribute: cols Maximum number of characters per line
Args: value: Valid non-negative integer greater than zero
Returns: An cols attribute to be added to your element
47 @staticmethod 48 def dirname(value: StrLike) -> BaseAttribute: 49 """ 50 "textarea" attribute: dirname 51 Name of form control to use for sending the element's directionality in form submission 52 53 Args: 54 value: 55 Text* 56 57 Returns: 58 An dirname attribute to be added to your element 59 60 """ 61 62 return BaseAttribute("dirname", value)
"textarea" attribute: dirname Name of form control to use for sending the element's directionality in form submission
Args: value: Text*
Returns: An dirname attribute to be added to your element
64 @staticmethod 65 def disabled(value: bool) -> BaseAttribute: 66 """ 67 "textarea" attribute: disabled 68 Whether the form control is disabled 69 70 Args: 71 value: 72 Boolean attribute 73 74 Returns: 75 An disabled attribute to be added to your element 76 77 """ 78 79 return BaseAttribute("disabled", value)
"textarea" attribute: disabled Whether the form control is disabled
Args: value: Boolean attribute
Returns: An disabled attribute to be added to your element
81 @staticmethod 82 def form(value) -> BaseAttribute: 83 """ 84 "textarea" attribute: form 85 Associates the element with a form element 86 87 Args: 88 value: 89 ID* 90 91 Returns: 92 An form attribute to be added to your element 93 94 """ 95 96 return BaseAttribute("form", value)
"textarea" attribute: form Associates the element with a form element
Args: value: ID*
Returns: An form attribute to be added to your element
98 @staticmethod 99 def maxlength(value: int) -> BaseAttribute: 100 """ 101 "textarea" attribute: maxlength 102 Maximum length of value 103 104 Args: 105 value: 106 Valid non-negative integer 107 108 Returns: 109 An maxlength attribute to be added to your element 110 111 """ 112 113 return BaseAttribute("maxlength", value)
"textarea" attribute: maxlength Maximum length of value
Args: value: Valid non-negative integer
Returns: An maxlength attribute to be added to your element
115 @staticmethod 116 def minlength(value: int) -> BaseAttribute: 117 """ 118 "textarea" attribute: minlength 119 Minimum length of value 120 121 Args: 122 value: 123 Valid non-negative integer 124 125 Returns: 126 An minlength attribute to be added to your element 127 128 """ 129 130 return BaseAttribute("minlength", value)
"textarea" attribute: minlength Minimum length of value
Args: value: Valid non-negative integer
Returns: An minlength attribute to be added to your element
132 @staticmethod 133 def name(value: StrLike) -> BaseAttribute: 134 """ 135 "textarea" attribute: name 136 Name of the element to use for form submission and in the form.elements API 137 138 Args: 139 value: 140 Text* 141 142 Returns: 143 An name attribute to be added to your element 144 145 """ 146 147 return BaseAttribute("name", value)
"textarea" 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
149 @staticmethod 150 def placeholder(value: StrLike) -> BaseAttribute: 151 """ 152 "textarea" attribute: placeholder 153 User-visible label to be placed within the form control 154 155 Args: 156 value: 157 Text* 158 159 Returns: 160 An placeholder attribute to be added to your element 161 162 """ 163 164 return BaseAttribute("placeholder", value)
"textarea" attribute: placeholder User-visible label to be placed within the form control
Args: value: Text*
Returns: An placeholder attribute to be added to your element
166 @staticmethod 167 def readonly(value: bool) -> BaseAttribute: 168 """ 169 "textarea" attribute: readonly 170 Whether to allow the value to be edited by the user 171 172 Args: 173 value: 174 Boolean attribute 175 176 Returns: 177 An readonly attribute to be added to your element 178 179 """ 180 181 return BaseAttribute("readonly", value)
"textarea" attribute: readonly Whether to allow the value to be edited by the user
Args: value: Boolean attribute
Returns: An readonly attribute to be added to your element
183 @staticmethod 184 def required(value: bool) -> BaseAttribute: 185 """ 186 "textarea" attribute: required 187 Whether the control is required for form submission 188 189 Args: 190 value: 191 Boolean attribute 192 193 Returns: 194 An required attribute to be added to your element 195 196 """ 197 198 return BaseAttribute("required", value)
"textarea" attribute: required Whether the control is required for form submission
Args: value: Boolean attribute
Returns: An required attribute to be added to your element
200 @staticmethod 201 def rows(value) -> BaseAttribute: 202 """ 203 "textarea" attribute: rows 204 Number of lines to show 205 206 Args: 207 value: 208 Valid non-negative integer greater than zero 209 210 Returns: 211 An rows attribute to be added to your element 212 213 """ 214 215 return BaseAttribute("rows", value)
"textarea" attribute: rows Number of lines to show
Args: value: Valid non-negative integer greater than zero
Returns: An rows attribute to be added to your element
217 @staticmethod 218 def wrap(value: Literal["soft", "hard"]) -> BaseAttribute: 219 """ 220 "textarea" attribute: wrap 221 How the value of the form control is to be wrapped for form submission 222 223 Args: 224 value: 225 ['soft', 'hard'] 226 227 Returns: 228 An wrap attribute to be added to your element 229 230 """ 231 232 return BaseAttribute("wrap", value)
"textarea" attribute: wrap How the value of the form control is to be wrapped for form submission
Args: value: ['soft', 'hard']
Returns: An wrap attribute to be added to your element