html_compose.attributes.input_attrs
1from . import BaseAttribute 2from typing import Literal 3from ..base_types import StrLike 4 5 6class InputAttrs: 7 """ 8 This module contains functions for attributes in the 'input' element. 9 Which is inherited by a class so we can generate type hints 10 """ 11 12 @staticmethod 13 def accept(value) -> BaseAttribute: 14 """ 15 "input" attribute: accept 16 Hint for expected file type in file upload controls 17 18 Args: 19 value: 20 Set of comma-separated tokens* consisting of valid MIME type strings with no parameters or audio/*, video/*, or image/* 21 22 Returns: 23 An accept attribute to be added to your element 24 25 """ 26 27 return BaseAttribute("accept", value) 28 29 @staticmethod 30 def alpha(value: bool) -> BaseAttribute: 31 """ 32 "input" attribute: alpha 33 Allow the color's alpha component to be set 34 35 Args: 36 value: 37 Boolean attribute 38 39 Returns: 40 An alpha attribute to be added to your element 41 42 """ 43 44 return BaseAttribute("alpha", value) 45 46 @staticmethod 47 def alt(value: StrLike) -> BaseAttribute: 48 """ 49 "input" attribute: alt 50 Replacement text for use when images are not available 51 52 Args: 53 value: 54 Text* 55 56 Returns: 57 An alt attribute to be added to your element 58 59 """ 60 61 return BaseAttribute("alt", value) 62 63 @staticmethod 64 def autocomplete(value) -> BaseAttribute: 65 """ 66 "input" attribute: autocomplete 67 Hint for form autofill feature 68 69 Args: 70 value: 71 Autofill field name and related tokens* 72 73 Returns: 74 An autocomplete attribute to be added to your element 75 76 """ 77 78 return BaseAttribute("autocomplete", value) 79 80 @staticmethod 81 def checked(value: bool) -> BaseAttribute: 82 """ 83 "input" attribute: checked 84 Whether the control is checked 85 86 Args: 87 value: 88 Boolean attribute 89 90 Returns: 91 An checked attribute to be added to your element 92 93 """ 94 95 return BaseAttribute("checked", value) 96 97 @staticmethod 98 def colorspace( 99 value: Literal["limited-srgb", "display-p3"], 100 ) -> BaseAttribute: 101 """ 102 "input" attribute: colorspace 103 The color space of the serialized color 104 105 Args: 106 value: 107 ['limited-srgb', 'display-p3'] 108 109 Returns: 110 An colorspace attribute to be added to your element 111 112 """ 113 114 return BaseAttribute("colorspace", value) 115 116 @staticmethod 117 def dirname(value: StrLike) -> BaseAttribute: 118 """ 119 "input" attribute: dirname 120 Name of form control to use for sending the element's directionality in form submission 121 122 Args: 123 value: 124 Text* 125 126 Returns: 127 An dirname attribute to be added to your element 128 129 """ 130 131 return BaseAttribute("dirname", value) 132 133 @staticmethod 134 def disabled(value: bool) -> BaseAttribute: 135 """ 136 "input" attribute: disabled 137 Whether the form control is disabled 138 139 Args: 140 value: 141 Boolean attribute 142 143 Returns: 144 An disabled attribute to be added to your element 145 146 """ 147 148 return BaseAttribute("disabled", value) 149 150 @staticmethod 151 def form(value) -> BaseAttribute: 152 """ 153 "input" attribute: form 154 Associates the element with a form element 155 156 Args: 157 value: 158 ID* 159 160 Returns: 161 An form attribute to be added to your element 162 163 """ 164 165 return BaseAttribute("form", value) 166 167 @staticmethod 168 def formaction(value) -> BaseAttribute: 169 """ 170 "input" attribute: formaction 171 URL to use for form submission 172 173 Args: 174 value: 175 Valid non-empty URL potentially surrounded by spaces 176 177 Returns: 178 An formaction attribute to be added to your element 179 180 """ 181 182 return BaseAttribute("formaction", value) 183 184 @staticmethod 185 def formenctype( 186 value: Literal[ 187 "application/x-www-form-urlencoded", 188 "multipart/form-data", 189 "text/plain", 190 ], 191 ) -> BaseAttribute: 192 """ 193 "input" attribute: formenctype 194 Entry list encoding type to use for form submission 195 196 Args: 197 value: 198 ['application/x-www-form-urlencoded', 'multipart/form-data', 'text/plain'] 199 200 Returns: 201 An formenctype attribute to be added to your element 202 203 """ 204 205 return BaseAttribute("formenctype", value) 206 207 @staticmethod 208 def formmethod(value: Literal["GET", "POST", "dialog"]) -> BaseAttribute: 209 """ 210 "input" attribute: formmethod 211 Variant to use for form submission 212 213 Args: 214 value: 215 ['GET', 'POST', 'dialog'] 216 217 Returns: 218 An formmethod attribute to be added to your element 219 220 """ 221 222 return BaseAttribute("formmethod", value) 223 224 @staticmethod 225 def formnovalidate(value: bool) -> BaseAttribute: 226 """ 227 "input" attribute: formnovalidate 228 Bypass form control validation for form submission 229 230 Args: 231 value: 232 Boolean attribute 233 234 Returns: 235 An formnovalidate attribute to be added to your element 236 237 """ 238 239 return BaseAttribute("formnovalidate", value) 240 241 @staticmethod 242 def formtarget(value) -> BaseAttribute: 243 """ 244 "input" attribute: formtarget 245 Navigable for form submission 246 247 Args: 248 value: 249 Valid navigable target name or keyword 250 251 Returns: 252 An formtarget attribute to be added to your element 253 254 """ 255 256 return BaseAttribute("formtarget", value) 257 258 @staticmethod 259 def height(value: int) -> BaseAttribute: 260 """ 261 "input" attribute: height 262 Vertical dimension 263 264 Args: 265 value: 266 Valid non-negative integer 267 268 Returns: 269 An height attribute to be added to your element 270 271 """ 272 273 return BaseAttribute("height", value) 274 275 @staticmethod 276 def list(value) -> BaseAttribute: 277 """ 278 "input" attribute: list 279 List of autocomplete options 280 281 Args: 282 value: 283 ID* 284 285 Returns: 286 An list attribute to be added to your element 287 288 """ 289 290 return BaseAttribute("list", value) 291 292 @staticmethod 293 def max(value) -> BaseAttribute: 294 """ 295 "input" attribute: max 296 Maximum value 297 298 Args: 299 value: 300 Varies* 301 302 Returns: 303 An max attribute to be added to your element 304 305 """ 306 307 return BaseAttribute("max", value) 308 309 @staticmethod 310 def maxlength(value: int) -> BaseAttribute: 311 """ 312 "input" attribute: maxlength 313 Maximum length of value 314 315 Args: 316 value: 317 Valid non-negative integer 318 319 Returns: 320 An maxlength attribute to be added to your element 321 322 """ 323 324 return BaseAttribute("maxlength", value) 325 326 @staticmethod 327 def min(value) -> BaseAttribute: 328 """ 329 "input" attribute: min 330 Minimum value 331 332 Args: 333 value: 334 Varies* 335 336 Returns: 337 An min attribute to be added to your element 338 339 """ 340 341 return BaseAttribute("min", value) 342 343 @staticmethod 344 def minlength(value: int) -> BaseAttribute: 345 """ 346 "input" attribute: minlength 347 Minimum length of value 348 349 Args: 350 value: 351 Valid non-negative integer 352 353 Returns: 354 An minlength attribute to be added to your element 355 356 """ 357 358 return BaseAttribute("minlength", value) 359 360 @staticmethod 361 def multiple(value: bool) -> BaseAttribute: 362 """ 363 "input" attribute: multiple 364 Whether to allow multiple values 365 366 Args: 367 value: 368 Boolean attribute 369 370 Returns: 371 An multiple attribute to be added to your element 372 373 """ 374 375 return BaseAttribute("multiple", value) 376 377 @staticmethod 378 def name(value: StrLike) -> BaseAttribute: 379 """ 380 "input" attribute: name 381 Name of the element to use for form submission and in the form.elements API 382 383 Args: 384 value: 385 Text* 386 387 Returns: 388 An name attribute to be added to your element 389 390 """ 391 392 return BaseAttribute("name", value) 393 394 @staticmethod 395 def pattern(value) -> BaseAttribute: 396 """ 397 "input" attribute: pattern 398 Pattern to be matched by the form control's value 399 400 Args: 401 value: 402 Regular expression matching the JavaScript Pattern production 403 404 Returns: 405 An pattern attribute to be added to your element 406 407 """ 408 409 return BaseAttribute("pattern", value) 410 411 @staticmethod 412 def placeholder(value: StrLike) -> BaseAttribute: 413 """ 414 "input" attribute: placeholder 415 User-visible label to be placed within the form control 416 417 Args: 418 value: 419 Text* 420 421 Returns: 422 An placeholder attribute to be added to your element 423 424 """ 425 426 return BaseAttribute("placeholder", value) 427 428 @staticmethod 429 def popovertarget(value) -> BaseAttribute: 430 """ 431 "input" attribute: popovertarget 432 Targets a popover element to toggle, show, or hide 433 434 Args: 435 value: 436 ID* 437 438 Returns: 439 An popovertarget attribute to be added to your element 440 441 """ 442 443 return BaseAttribute("popovertarget", value) 444 445 @staticmethod 446 def popovertargetaction( 447 value: Literal["toggle", "show", "hide"], 448 ) -> BaseAttribute: 449 """ 450 "input" attribute: popovertargetaction 451 Indicates whether a targeted popover element is to be toggled, shown, or hidden 452 453 Args: 454 value: 455 ['toggle', 'show', 'hide'] 456 457 Returns: 458 An popovertargetaction attribute to be added to your element 459 460 """ 461 462 return BaseAttribute("popovertargetaction", value) 463 464 @staticmethod 465 def readonly(value: bool) -> BaseAttribute: 466 """ 467 "input" attribute: readonly 468 Whether to allow the value to be edited by the user 469 470 Args: 471 value: 472 Boolean attribute 473 474 Returns: 475 An readonly attribute to be added to your element 476 477 """ 478 479 return BaseAttribute("readonly", value) 480 481 @staticmethod 482 def required(value: bool) -> BaseAttribute: 483 """ 484 "input" attribute: required 485 Whether the control is required for form submission 486 487 Args: 488 value: 489 Boolean attribute 490 491 Returns: 492 An required attribute to be added to your element 493 494 """ 495 496 return BaseAttribute("required", value) 497 498 @staticmethod 499 def size(value) -> BaseAttribute: 500 """ 501 "input" attribute: size 502 Size of the control 503 504 Args: 505 value: 506 Valid non-negative integer greater than zero 507 508 Returns: 509 An size attribute to be added to your element 510 511 """ 512 513 return BaseAttribute("size", value) 514 515 @staticmethod 516 def src(value) -> BaseAttribute: 517 """ 518 "input" attribute: src 519 Address of the resource 520 521 Args: 522 value: 523 Valid non-empty URL potentially surrounded by spaces 524 525 Returns: 526 An src attribute to be added to your element 527 528 """ 529 530 return BaseAttribute("src", value) 531 532 @staticmethod 533 def step(value: float) -> BaseAttribute: 534 """ 535 "input" attribute: step 536 Granularity to be matched by the form control's value 537 538 Args: 539 value: 540 Valid floating-point number greater than zero, or "any" 541 542 Returns: 543 An step attribute to be added to your element 544 545 """ 546 547 return BaseAttribute("step", value) 548 549 @staticmethod 550 def title(value: StrLike) -> BaseAttribute: 551 """ 552 "input" attribute: title 553 Description of pattern (when used with pattern attribute) 554 555 Args: 556 value: 557 Text 558 559 Returns: 560 An title attribute to be added to your element 561 562 """ 563 564 return BaseAttribute("title", value) 565 566 @staticmethod 567 def type(value) -> BaseAttribute: 568 """ 569 "input" attribute: type 570 Type of form control 571 572 Args: 573 value: 574 input type keyword 575 576 Returns: 577 An type attribute to be added to your element 578 579 """ 580 581 return BaseAttribute("type", value) 582 583 @staticmethod 584 def value(value) -> BaseAttribute: 585 """ 586 "input" attribute: value 587 Value of the form control 588 589 Args: 590 value: 591 Varies* 592 593 Returns: 594 An value attribute to be added to your element 595 596 """ 597 598 return BaseAttribute("value", value) 599 600 @staticmethod 601 def width(value: int) -> BaseAttribute: 602 """ 603 "input" attribute: width 604 Horizontal dimension 605 606 Args: 607 value: 608 Valid non-negative integer 609 610 Returns: 611 An width attribute to be added to your element 612 613 """ 614 615 return BaseAttribute("width", value)
7class InputAttrs: 8 """ 9 This module contains functions for attributes in the 'input' element. 10 Which is inherited by a class so we can generate type hints 11 """ 12 13 @staticmethod 14 def accept(value) -> BaseAttribute: 15 """ 16 "input" attribute: accept 17 Hint for expected file type in file upload controls 18 19 Args: 20 value: 21 Set of comma-separated tokens* consisting of valid MIME type strings with no parameters or audio/*, video/*, or image/* 22 23 Returns: 24 An accept attribute to be added to your element 25 26 """ 27 28 return BaseAttribute("accept", value) 29 30 @staticmethod 31 def alpha(value: bool) -> BaseAttribute: 32 """ 33 "input" attribute: alpha 34 Allow the color's alpha component to be set 35 36 Args: 37 value: 38 Boolean attribute 39 40 Returns: 41 An alpha attribute to be added to your element 42 43 """ 44 45 return BaseAttribute("alpha", value) 46 47 @staticmethod 48 def alt(value: StrLike) -> BaseAttribute: 49 """ 50 "input" attribute: alt 51 Replacement text for use when images are not available 52 53 Args: 54 value: 55 Text* 56 57 Returns: 58 An alt attribute to be added to your element 59 60 """ 61 62 return BaseAttribute("alt", value) 63 64 @staticmethod 65 def autocomplete(value) -> BaseAttribute: 66 """ 67 "input" attribute: autocomplete 68 Hint for form autofill feature 69 70 Args: 71 value: 72 Autofill field name and related tokens* 73 74 Returns: 75 An autocomplete attribute to be added to your element 76 77 """ 78 79 return BaseAttribute("autocomplete", value) 80 81 @staticmethod 82 def checked(value: bool) -> BaseAttribute: 83 """ 84 "input" attribute: checked 85 Whether the control is checked 86 87 Args: 88 value: 89 Boolean attribute 90 91 Returns: 92 An checked attribute to be added to your element 93 94 """ 95 96 return BaseAttribute("checked", value) 97 98 @staticmethod 99 def colorspace( 100 value: Literal["limited-srgb", "display-p3"], 101 ) -> BaseAttribute: 102 """ 103 "input" attribute: colorspace 104 The color space of the serialized color 105 106 Args: 107 value: 108 ['limited-srgb', 'display-p3'] 109 110 Returns: 111 An colorspace attribute to be added to your element 112 113 """ 114 115 return BaseAttribute("colorspace", value) 116 117 @staticmethod 118 def dirname(value: StrLike) -> BaseAttribute: 119 """ 120 "input" attribute: dirname 121 Name of form control to use for sending the element's directionality in form submission 122 123 Args: 124 value: 125 Text* 126 127 Returns: 128 An dirname attribute to be added to your element 129 130 """ 131 132 return BaseAttribute("dirname", value) 133 134 @staticmethod 135 def disabled(value: bool) -> BaseAttribute: 136 """ 137 "input" attribute: disabled 138 Whether the form control is disabled 139 140 Args: 141 value: 142 Boolean attribute 143 144 Returns: 145 An disabled attribute to be added to your element 146 147 """ 148 149 return BaseAttribute("disabled", value) 150 151 @staticmethod 152 def form(value) -> BaseAttribute: 153 """ 154 "input" attribute: form 155 Associates the element with a form element 156 157 Args: 158 value: 159 ID* 160 161 Returns: 162 An form attribute to be added to your element 163 164 """ 165 166 return BaseAttribute("form", value) 167 168 @staticmethod 169 def formaction(value) -> BaseAttribute: 170 """ 171 "input" attribute: formaction 172 URL to use for form submission 173 174 Args: 175 value: 176 Valid non-empty URL potentially surrounded by spaces 177 178 Returns: 179 An formaction attribute to be added to your element 180 181 """ 182 183 return BaseAttribute("formaction", value) 184 185 @staticmethod 186 def formenctype( 187 value: Literal[ 188 "application/x-www-form-urlencoded", 189 "multipart/form-data", 190 "text/plain", 191 ], 192 ) -> BaseAttribute: 193 """ 194 "input" attribute: formenctype 195 Entry list encoding type to use for form submission 196 197 Args: 198 value: 199 ['application/x-www-form-urlencoded', 'multipart/form-data', 'text/plain'] 200 201 Returns: 202 An formenctype attribute to be added to your element 203 204 """ 205 206 return BaseAttribute("formenctype", value) 207 208 @staticmethod 209 def formmethod(value: Literal["GET", "POST", "dialog"]) -> BaseAttribute: 210 """ 211 "input" attribute: formmethod 212 Variant to use for form submission 213 214 Args: 215 value: 216 ['GET', 'POST', 'dialog'] 217 218 Returns: 219 An formmethod attribute to be added to your element 220 221 """ 222 223 return BaseAttribute("formmethod", value) 224 225 @staticmethod 226 def formnovalidate(value: bool) -> BaseAttribute: 227 """ 228 "input" attribute: formnovalidate 229 Bypass form control validation for form submission 230 231 Args: 232 value: 233 Boolean attribute 234 235 Returns: 236 An formnovalidate attribute to be added to your element 237 238 """ 239 240 return BaseAttribute("formnovalidate", value) 241 242 @staticmethod 243 def formtarget(value) -> BaseAttribute: 244 """ 245 "input" attribute: formtarget 246 Navigable for form submission 247 248 Args: 249 value: 250 Valid navigable target name or keyword 251 252 Returns: 253 An formtarget attribute to be added to your element 254 255 """ 256 257 return BaseAttribute("formtarget", value) 258 259 @staticmethod 260 def height(value: int) -> BaseAttribute: 261 """ 262 "input" attribute: height 263 Vertical dimension 264 265 Args: 266 value: 267 Valid non-negative integer 268 269 Returns: 270 An height attribute to be added to your element 271 272 """ 273 274 return BaseAttribute("height", value) 275 276 @staticmethod 277 def list(value) -> BaseAttribute: 278 """ 279 "input" attribute: list 280 List of autocomplete options 281 282 Args: 283 value: 284 ID* 285 286 Returns: 287 An list attribute to be added to your element 288 289 """ 290 291 return BaseAttribute("list", value) 292 293 @staticmethod 294 def max(value) -> BaseAttribute: 295 """ 296 "input" attribute: max 297 Maximum value 298 299 Args: 300 value: 301 Varies* 302 303 Returns: 304 An max attribute to be added to your element 305 306 """ 307 308 return BaseAttribute("max", value) 309 310 @staticmethod 311 def maxlength(value: int) -> BaseAttribute: 312 """ 313 "input" attribute: maxlength 314 Maximum length of value 315 316 Args: 317 value: 318 Valid non-negative integer 319 320 Returns: 321 An maxlength attribute to be added to your element 322 323 """ 324 325 return BaseAttribute("maxlength", value) 326 327 @staticmethod 328 def min(value) -> BaseAttribute: 329 """ 330 "input" attribute: min 331 Minimum value 332 333 Args: 334 value: 335 Varies* 336 337 Returns: 338 An min attribute to be added to your element 339 340 """ 341 342 return BaseAttribute("min", value) 343 344 @staticmethod 345 def minlength(value: int) -> BaseAttribute: 346 """ 347 "input" attribute: minlength 348 Minimum length of value 349 350 Args: 351 value: 352 Valid non-negative integer 353 354 Returns: 355 An minlength attribute to be added to your element 356 357 """ 358 359 return BaseAttribute("minlength", value) 360 361 @staticmethod 362 def multiple(value: bool) -> BaseAttribute: 363 """ 364 "input" attribute: multiple 365 Whether to allow multiple values 366 367 Args: 368 value: 369 Boolean attribute 370 371 Returns: 372 An multiple attribute to be added to your element 373 374 """ 375 376 return BaseAttribute("multiple", value) 377 378 @staticmethod 379 def name(value: StrLike) -> BaseAttribute: 380 """ 381 "input" attribute: name 382 Name of the element to use for form submission and in the form.elements API 383 384 Args: 385 value: 386 Text* 387 388 Returns: 389 An name attribute to be added to your element 390 391 """ 392 393 return BaseAttribute("name", value) 394 395 @staticmethod 396 def pattern(value) -> BaseAttribute: 397 """ 398 "input" attribute: pattern 399 Pattern to be matched by the form control's value 400 401 Args: 402 value: 403 Regular expression matching the JavaScript Pattern production 404 405 Returns: 406 An pattern attribute to be added to your element 407 408 """ 409 410 return BaseAttribute("pattern", value) 411 412 @staticmethod 413 def placeholder(value: StrLike) -> BaseAttribute: 414 """ 415 "input" attribute: placeholder 416 User-visible label to be placed within the form control 417 418 Args: 419 value: 420 Text* 421 422 Returns: 423 An placeholder attribute to be added to your element 424 425 """ 426 427 return BaseAttribute("placeholder", value) 428 429 @staticmethod 430 def popovertarget(value) -> BaseAttribute: 431 """ 432 "input" attribute: popovertarget 433 Targets a popover element to toggle, show, or hide 434 435 Args: 436 value: 437 ID* 438 439 Returns: 440 An popovertarget attribute to be added to your element 441 442 """ 443 444 return BaseAttribute("popovertarget", value) 445 446 @staticmethod 447 def popovertargetaction( 448 value: Literal["toggle", "show", "hide"], 449 ) -> BaseAttribute: 450 """ 451 "input" attribute: popovertargetaction 452 Indicates whether a targeted popover element is to be toggled, shown, or hidden 453 454 Args: 455 value: 456 ['toggle', 'show', 'hide'] 457 458 Returns: 459 An popovertargetaction attribute to be added to your element 460 461 """ 462 463 return BaseAttribute("popovertargetaction", value) 464 465 @staticmethod 466 def readonly(value: bool) -> BaseAttribute: 467 """ 468 "input" attribute: readonly 469 Whether to allow the value to be edited by the user 470 471 Args: 472 value: 473 Boolean attribute 474 475 Returns: 476 An readonly attribute to be added to your element 477 478 """ 479 480 return BaseAttribute("readonly", value) 481 482 @staticmethod 483 def required(value: bool) -> BaseAttribute: 484 """ 485 "input" attribute: required 486 Whether the control is required for form submission 487 488 Args: 489 value: 490 Boolean attribute 491 492 Returns: 493 An required attribute to be added to your element 494 495 """ 496 497 return BaseAttribute("required", value) 498 499 @staticmethod 500 def size(value) -> BaseAttribute: 501 """ 502 "input" attribute: size 503 Size of the control 504 505 Args: 506 value: 507 Valid non-negative integer greater than zero 508 509 Returns: 510 An size attribute to be added to your element 511 512 """ 513 514 return BaseAttribute("size", value) 515 516 @staticmethod 517 def src(value) -> BaseAttribute: 518 """ 519 "input" attribute: src 520 Address of the resource 521 522 Args: 523 value: 524 Valid non-empty URL potentially surrounded by spaces 525 526 Returns: 527 An src attribute to be added to your element 528 529 """ 530 531 return BaseAttribute("src", value) 532 533 @staticmethod 534 def step(value: float) -> BaseAttribute: 535 """ 536 "input" attribute: step 537 Granularity to be matched by the form control's value 538 539 Args: 540 value: 541 Valid floating-point number greater than zero, or "any" 542 543 Returns: 544 An step attribute to be added to your element 545 546 """ 547 548 return BaseAttribute("step", value) 549 550 @staticmethod 551 def title(value: StrLike) -> BaseAttribute: 552 """ 553 "input" attribute: title 554 Description of pattern (when used with pattern attribute) 555 556 Args: 557 value: 558 Text 559 560 Returns: 561 An title attribute to be added to your element 562 563 """ 564 565 return BaseAttribute("title", value) 566 567 @staticmethod 568 def type(value) -> BaseAttribute: 569 """ 570 "input" attribute: type 571 Type of form control 572 573 Args: 574 value: 575 input type keyword 576 577 Returns: 578 An type attribute to be added to your element 579 580 """ 581 582 return BaseAttribute("type", value) 583 584 @staticmethod 585 def value(value) -> BaseAttribute: 586 """ 587 "input" attribute: value 588 Value of the form control 589 590 Args: 591 value: 592 Varies* 593 594 Returns: 595 An value attribute to be added to your element 596 597 """ 598 599 return BaseAttribute("value", value) 600 601 @staticmethod 602 def width(value: int) -> BaseAttribute: 603 """ 604 "input" attribute: width 605 Horizontal dimension 606 607 Args: 608 value: 609 Valid non-negative integer 610 611 Returns: 612 An width attribute to be added to your element 613 614 """ 615 616 return BaseAttribute("width", value)
This module contains functions for attributes in the 'input' element. Which is inherited by a class so we can generate type hints
13 @staticmethod 14 def accept(value) -> BaseAttribute: 15 """ 16 "input" attribute: accept 17 Hint for expected file type in file upload controls 18 19 Args: 20 value: 21 Set of comma-separated tokens* consisting of valid MIME type strings with no parameters or audio/*, video/*, or image/* 22 23 Returns: 24 An accept attribute to be added to your element 25 26 """ 27 28 return BaseAttribute("accept", value)
"input" attribute: accept Hint for expected file type in file upload controls
Args: value: Set of comma-separated tokens* consisting of valid MIME type strings with no parameters or audio/, video/, or image/*
Returns: An accept attribute to be added to your element
30 @staticmethod 31 def alpha(value: bool) -> BaseAttribute: 32 """ 33 "input" attribute: alpha 34 Allow the color's alpha component to be set 35 36 Args: 37 value: 38 Boolean attribute 39 40 Returns: 41 An alpha attribute to be added to your element 42 43 """ 44 45 return BaseAttribute("alpha", value)
"input" attribute: alpha Allow the color's alpha component to be set
Args: value: Boolean attribute
Returns: An alpha attribute to be added to your element
47 @staticmethod 48 def alt(value: StrLike) -> BaseAttribute: 49 """ 50 "input" attribute: alt 51 Replacement text for use when images are not available 52 53 Args: 54 value: 55 Text* 56 57 Returns: 58 An alt attribute to be added to your element 59 60 """ 61 62 return BaseAttribute("alt", value)
"input" attribute: alt Replacement text for use when images are not available
Args: value: Text*
Returns: An alt attribute to be added to your element
64 @staticmethod 65 def autocomplete(value) -> BaseAttribute: 66 """ 67 "input" attribute: autocomplete 68 Hint for form autofill feature 69 70 Args: 71 value: 72 Autofill field name and related tokens* 73 74 Returns: 75 An autocomplete attribute to be added to your element 76 77 """ 78 79 return BaseAttribute("autocomplete", value)
"input" 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
81 @staticmethod 82 def checked(value: bool) -> BaseAttribute: 83 """ 84 "input" attribute: checked 85 Whether the control is checked 86 87 Args: 88 value: 89 Boolean attribute 90 91 Returns: 92 An checked attribute to be added to your element 93 94 """ 95 96 return BaseAttribute("checked", value)
"input" attribute: checked Whether the control is checked
Args: value: Boolean attribute
Returns: An checked attribute to be added to your element
98 @staticmethod 99 def colorspace( 100 value: Literal["limited-srgb", "display-p3"], 101 ) -> BaseAttribute: 102 """ 103 "input" attribute: colorspace 104 The color space of the serialized color 105 106 Args: 107 value: 108 ['limited-srgb', 'display-p3'] 109 110 Returns: 111 An colorspace attribute to be added to your element 112 113 """ 114 115 return BaseAttribute("colorspace", value)
"input" attribute: colorspace The color space of the serialized color
Args: value: ['limited-srgb', 'display-p3']
Returns: An colorspace attribute to be added to your element
117 @staticmethod 118 def dirname(value: StrLike) -> BaseAttribute: 119 """ 120 "input" attribute: dirname 121 Name of form control to use for sending the element's directionality in form submission 122 123 Args: 124 value: 125 Text* 126 127 Returns: 128 An dirname attribute to be added to your element 129 130 """ 131 132 return BaseAttribute("dirname", value)
"input" 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
134 @staticmethod 135 def disabled(value: bool) -> BaseAttribute: 136 """ 137 "input" attribute: disabled 138 Whether the form control is disabled 139 140 Args: 141 value: 142 Boolean attribute 143 144 Returns: 145 An disabled attribute to be added to your element 146 147 """ 148 149 return BaseAttribute("disabled", value)
"input" attribute: disabled Whether the form control is disabled
Args: value: Boolean attribute
Returns: An disabled attribute to be added to your element
151 @staticmethod 152 def form(value) -> BaseAttribute: 153 """ 154 "input" attribute: form 155 Associates the element with a form element 156 157 Args: 158 value: 159 ID* 160 161 Returns: 162 An form attribute to be added to your element 163 164 """ 165 166 return BaseAttribute("form", value)
"input" attribute: form Associates the element with a form element
Args: value: ID*
Returns: An form attribute to be added to your element
168 @staticmethod 169 def formaction(value) -> BaseAttribute: 170 """ 171 "input" attribute: formaction 172 URL to use for form submission 173 174 Args: 175 value: 176 Valid non-empty URL potentially surrounded by spaces 177 178 Returns: 179 An formaction attribute to be added to your element 180 181 """ 182 183 return BaseAttribute("formaction", value)
"input" 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
185 @staticmethod 186 def formenctype( 187 value: Literal[ 188 "application/x-www-form-urlencoded", 189 "multipart/form-data", 190 "text/plain", 191 ], 192 ) -> BaseAttribute: 193 """ 194 "input" attribute: formenctype 195 Entry list encoding type to use for form submission 196 197 Args: 198 value: 199 ['application/x-www-form-urlencoded', 'multipart/form-data', 'text/plain'] 200 201 Returns: 202 An formenctype attribute to be added to your element 203 204 """ 205 206 return BaseAttribute("formenctype", value)
"input" 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
208 @staticmethod 209 def formmethod(value: Literal["GET", "POST", "dialog"]) -> BaseAttribute: 210 """ 211 "input" attribute: formmethod 212 Variant to use for form submission 213 214 Args: 215 value: 216 ['GET', 'POST', 'dialog'] 217 218 Returns: 219 An formmethod attribute to be added to your element 220 221 """ 222 223 return BaseAttribute("formmethod", value)
"input" attribute: formmethod Variant to use for form submission
Args: value: ['GET', 'POST', 'dialog']
Returns: An formmethod attribute to be added to your element
225 @staticmethod 226 def formnovalidate(value: bool) -> BaseAttribute: 227 """ 228 "input" attribute: formnovalidate 229 Bypass form control validation for form submission 230 231 Args: 232 value: 233 Boolean attribute 234 235 Returns: 236 An formnovalidate attribute to be added to your element 237 238 """ 239 240 return BaseAttribute("formnovalidate", value)
"input" attribute: formnovalidate Bypass form control validation for form submission
Args: value: Boolean attribute
Returns: An formnovalidate attribute to be added to your element
242 @staticmethod 243 def formtarget(value) -> BaseAttribute: 244 """ 245 "input" attribute: formtarget 246 Navigable for form submission 247 248 Args: 249 value: 250 Valid navigable target name or keyword 251 252 Returns: 253 An formtarget attribute to be added to your element 254 255 """ 256 257 return BaseAttribute("formtarget", value)
"input" attribute: formtarget Navigable for form submission
Args: value: Valid navigable target name or keyword
Returns: An formtarget attribute to be added to your element
259 @staticmethod 260 def height(value: int) -> BaseAttribute: 261 """ 262 "input" attribute: height 263 Vertical dimension 264 265 Args: 266 value: 267 Valid non-negative integer 268 269 Returns: 270 An height attribute to be added to your element 271 272 """ 273 274 return BaseAttribute("height", value)
"input" attribute: height Vertical dimension
Args: value: Valid non-negative integer
Returns: An height attribute to be added to your element
276 @staticmethod 277 def list(value) -> BaseAttribute: 278 """ 279 "input" attribute: list 280 List of autocomplete options 281 282 Args: 283 value: 284 ID* 285 286 Returns: 287 An list attribute to be added to your element 288 289 """ 290 291 return BaseAttribute("list", value)
"input" attribute: list List of autocomplete options
Args: value: ID*
Returns: An list attribute to be added to your element
293 @staticmethod 294 def max(value) -> BaseAttribute: 295 """ 296 "input" attribute: max 297 Maximum value 298 299 Args: 300 value: 301 Varies* 302 303 Returns: 304 An max attribute to be added to your element 305 306 """ 307 308 return BaseAttribute("max", value)
"input" attribute: max Maximum value
Args: value: Varies*
Returns: An max attribute to be added to your element
310 @staticmethod 311 def maxlength(value: int) -> BaseAttribute: 312 """ 313 "input" attribute: maxlength 314 Maximum length of value 315 316 Args: 317 value: 318 Valid non-negative integer 319 320 Returns: 321 An maxlength attribute to be added to your element 322 323 """ 324 325 return BaseAttribute("maxlength", value)
"input" attribute: maxlength Maximum length of value
Args: value: Valid non-negative integer
Returns: An maxlength attribute to be added to your element
327 @staticmethod 328 def min(value) -> BaseAttribute: 329 """ 330 "input" attribute: min 331 Minimum value 332 333 Args: 334 value: 335 Varies* 336 337 Returns: 338 An min attribute to be added to your element 339 340 """ 341 342 return BaseAttribute("min", value)
"input" attribute: min Minimum value
Args: value: Varies*
Returns: An min attribute to be added to your element
344 @staticmethod 345 def minlength(value: int) -> BaseAttribute: 346 """ 347 "input" attribute: minlength 348 Minimum length of value 349 350 Args: 351 value: 352 Valid non-negative integer 353 354 Returns: 355 An minlength attribute to be added to your element 356 357 """ 358 359 return BaseAttribute("minlength", value)
"input" attribute: minlength Minimum length of value
Args: value: Valid non-negative integer
Returns: An minlength attribute to be added to your element
361 @staticmethod 362 def multiple(value: bool) -> BaseAttribute: 363 """ 364 "input" attribute: multiple 365 Whether to allow multiple values 366 367 Args: 368 value: 369 Boolean attribute 370 371 Returns: 372 An multiple attribute to be added to your element 373 374 """ 375 376 return BaseAttribute("multiple", value)
"input" attribute: multiple Whether to allow multiple values
Args: value: Boolean attribute
Returns: An multiple attribute to be added to your element
378 @staticmethod 379 def name(value: StrLike) -> BaseAttribute: 380 """ 381 "input" attribute: name 382 Name of the element to use for form submission and in the form.elements API 383 384 Args: 385 value: 386 Text* 387 388 Returns: 389 An name attribute to be added to your element 390 391 """ 392 393 return BaseAttribute("name", value)
"input" 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
395 @staticmethod 396 def pattern(value) -> BaseAttribute: 397 """ 398 "input" attribute: pattern 399 Pattern to be matched by the form control's value 400 401 Args: 402 value: 403 Regular expression matching the JavaScript Pattern production 404 405 Returns: 406 An pattern attribute to be added to your element 407 408 """ 409 410 return BaseAttribute("pattern", value)
"input" attribute: pattern Pattern to be matched by the form control's value
Args: value: Regular expression matching the JavaScript Pattern production
Returns: An pattern attribute to be added to your element
412 @staticmethod 413 def placeholder(value: StrLike) -> BaseAttribute: 414 """ 415 "input" attribute: placeholder 416 User-visible label to be placed within the form control 417 418 Args: 419 value: 420 Text* 421 422 Returns: 423 An placeholder attribute to be added to your element 424 425 """ 426 427 return BaseAttribute("placeholder", value)
"input" 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
429 @staticmethod 430 def popovertarget(value) -> BaseAttribute: 431 """ 432 "input" attribute: popovertarget 433 Targets a popover element to toggle, show, or hide 434 435 Args: 436 value: 437 ID* 438 439 Returns: 440 An popovertarget attribute to be added to your element 441 442 """ 443 444 return BaseAttribute("popovertarget", value)
"input" attribute: popovertarget Targets a popover element to toggle, show, or hide
Args: value: ID*
Returns: An popovertarget attribute to be added to your element
446 @staticmethod 447 def popovertargetaction( 448 value: Literal["toggle", "show", "hide"], 449 ) -> BaseAttribute: 450 """ 451 "input" attribute: popovertargetaction 452 Indicates whether a targeted popover element is to be toggled, shown, or hidden 453 454 Args: 455 value: 456 ['toggle', 'show', 'hide'] 457 458 Returns: 459 An popovertargetaction attribute to be added to your element 460 461 """ 462 463 return BaseAttribute("popovertargetaction", value)
"input" 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
465 @staticmethod 466 def readonly(value: bool) -> BaseAttribute: 467 """ 468 "input" attribute: readonly 469 Whether to allow the value to be edited by the user 470 471 Args: 472 value: 473 Boolean attribute 474 475 Returns: 476 An readonly attribute to be added to your element 477 478 """ 479 480 return BaseAttribute("readonly", value)
"input" 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
482 @staticmethod 483 def required(value: bool) -> BaseAttribute: 484 """ 485 "input" attribute: required 486 Whether the control is required for form submission 487 488 Args: 489 value: 490 Boolean attribute 491 492 Returns: 493 An required attribute to be added to your element 494 495 """ 496 497 return BaseAttribute("required", value)
"input" attribute: required Whether the control is required for form submission
Args: value: Boolean attribute
Returns: An required attribute to be added to your element
499 @staticmethod 500 def size(value) -> BaseAttribute: 501 """ 502 "input" attribute: size 503 Size of the control 504 505 Args: 506 value: 507 Valid non-negative integer greater than zero 508 509 Returns: 510 An size attribute to be added to your element 511 512 """ 513 514 return BaseAttribute("size", value)
"input" attribute: size Size of the control
Args: value: Valid non-negative integer greater than zero
Returns: An size attribute to be added to your element
516 @staticmethod 517 def src(value) -> BaseAttribute: 518 """ 519 "input" attribute: src 520 Address of the resource 521 522 Args: 523 value: 524 Valid non-empty URL potentially surrounded by spaces 525 526 Returns: 527 An src attribute to be added to your element 528 529 """ 530 531 return BaseAttribute("src", value)
"input" attribute: src Address of the resource
Args: value: Valid non-empty URL potentially surrounded by spaces
Returns: An src attribute to be added to your element
533 @staticmethod 534 def step(value: float) -> BaseAttribute: 535 """ 536 "input" attribute: step 537 Granularity to be matched by the form control's value 538 539 Args: 540 value: 541 Valid floating-point number greater than zero, or "any" 542 543 Returns: 544 An step attribute to be added to your element 545 546 """ 547 548 return BaseAttribute("step", value)
"input" attribute: step Granularity to be matched by the form control's value
Args: value: Valid floating-point number greater than zero, or "any"
Returns: An step attribute to be added to your element
550 @staticmethod 551 def title(value: StrLike) -> BaseAttribute: 552 """ 553 "input" attribute: title 554 Description of pattern (when used with pattern attribute) 555 556 Args: 557 value: 558 Text 559 560 Returns: 561 An title attribute to be added to your element 562 563 """ 564 565 return BaseAttribute("title", value)
"input" attribute: title Description of pattern (when used with pattern attribute)
Args: value: Text
Returns: An title attribute to be added to your element
567 @staticmethod 568 def type(value) -> BaseAttribute: 569 """ 570 "input" attribute: type 571 Type of form control 572 573 Args: 574 value: 575 input type keyword 576 577 Returns: 578 An type attribute to be added to your element 579 580 """ 581 582 return BaseAttribute("type", value)
"input" attribute: type Type of form control
Args: value: input type keyword
Returns: An type attribute to be added to your element
584 @staticmethod 585 def value(value) -> BaseAttribute: 586 """ 587 "input" attribute: value 588 Value of the form control 589 590 Args: 591 value: 592 Varies* 593 594 Returns: 595 An value attribute to be added to your element 596 597 """ 598 599 return BaseAttribute("value", value)
"input" attribute: value Value of the form control
Args: value: Varies*
Returns: An value attribute to be added to your element
601 @staticmethod 602 def width(value: int) -> BaseAttribute: 603 """ 604 "input" attribute: width 605 Horizontal dimension 606 607 Args: 608 value: 609 Valid non-negative integer 610 611 Returns: 612 An width attribute to be added to your element 613 614 """ 615 616 return BaseAttribute("width", value)
"input" attribute: width Horizontal dimension
Args: value: Valid non-negative integer
Returns: An width attribute to be added to your element