form.pyi 46 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081
  1. """Stub file for reflex/components/radix/primitives/form.py"""
  2. # ------------------- DO NOT EDIT ----------------------
  3. # This file was generated by `reflex/utils/pyi_generator.py`!
  4. # ------------------------------------------------------
  5. from typing import Any, Callable, Dict, Literal, Optional, Union, overload
  6. from reflex.components.component import ComponentNamespace
  7. from reflex.components.el.elements.forms import Form as HTMLForm
  8. from reflex.event import EventHandler, EventSpec
  9. from reflex.ivars.base import ImmutableVar
  10. from reflex.style import Style
  11. from reflex.vars import Var
  12. from .base import RadixPrimitiveComponentWithClassName
  13. class FormComponent(RadixPrimitiveComponentWithClassName):
  14. @overload
  15. @classmethod
  16. def create( # type: ignore
  17. cls,
  18. *children,
  19. as_child: Optional[Union[Var[bool], bool]] = None,
  20. style: Optional[Style] = None,
  21. key: Optional[Any] = None,
  22. id: Optional[Any] = None,
  23. class_name: Optional[Any] = None,
  24. autofocus: Optional[bool] = None,
  25. custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
  26. on_blur: Optional[
  27. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  28. ] = None,
  29. on_click: Optional[
  30. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  31. ] = None,
  32. on_context_menu: Optional[
  33. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  34. ] = None,
  35. on_double_click: Optional[
  36. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  37. ] = None,
  38. on_focus: Optional[
  39. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  40. ] = None,
  41. on_mount: Optional[
  42. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  43. ] = None,
  44. on_mouse_down: Optional[
  45. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  46. ] = None,
  47. on_mouse_enter: Optional[
  48. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  49. ] = None,
  50. on_mouse_leave: Optional[
  51. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  52. ] = None,
  53. on_mouse_move: Optional[
  54. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  55. ] = None,
  56. on_mouse_out: Optional[
  57. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  58. ] = None,
  59. on_mouse_over: Optional[
  60. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  61. ] = None,
  62. on_mouse_up: Optional[
  63. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  64. ] = None,
  65. on_scroll: Optional[
  66. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  67. ] = None,
  68. on_unmount: Optional[
  69. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  70. ] = None,
  71. **props,
  72. ) -> "FormComponent":
  73. """Create the component.
  74. Args:
  75. *children: The children of the component.
  76. as_child: Change the default rendered element for the one passed as a child.
  77. style: The style of the component.
  78. key: A unique key for the component.
  79. id: The id for the component.
  80. class_name: The class name for the component.
  81. autofocus: Whether the component should take the focus once the page is loaded
  82. custom_attrs: custom attribute
  83. **props: The props of the component.
  84. Returns:
  85. The component.
  86. """
  87. ...
  88. class FormRoot(FormComponent, HTMLForm):
  89. def add_style(self) -> dict[str, Any] | None: ...
  90. @overload
  91. @classmethod
  92. def create( # type: ignore
  93. cls,
  94. *children,
  95. as_child: Optional[Union[Var[bool], bool]] = None,
  96. accept: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  97. accept_charset: Optional[
  98. Union[Var[Union[bool, int, str]], str, int, bool]
  99. ] = None,
  100. action: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  101. auto_complete: Optional[
  102. Union[Var[Union[bool, int, str]], str, int, bool]
  103. ] = None,
  104. enc_type: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  105. method: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  106. name: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  107. no_validate: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  108. target: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  109. reset_on_submit: Optional[Union[Var[bool], bool]] = None,
  110. handle_submit_unique_name: Optional[Union[Var[str], str]] = None,
  111. access_key: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  112. auto_capitalize: Optional[
  113. Union[Var[Union[bool, int, str]], str, int, bool]
  114. ] = None,
  115. content_editable: Optional[
  116. Union[Var[Union[bool, int, str]], str, int, bool]
  117. ] = None,
  118. context_menu: Optional[
  119. Union[Var[Union[bool, int, str]], str, int, bool]
  120. ] = None,
  121. dir: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  122. draggable: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  123. enter_key_hint: Optional[
  124. Union[Var[Union[bool, int, str]], str, int, bool]
  125. ] = None,
  126. hidden: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  127. input_mode: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  128. item_prop: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  129. lang: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  130. role: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  131. slot: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  132. spell_check: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  133. tab_index: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  134. title: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  135. style: Optional[Style] = None,
  136. key: Optional[Any] = None,
  137. id: Optional[Any] = None,
  138. class_name: Optional[Any] = None,
  139. autofocus: Optional[bool] = None,
  140. custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
  141. on_blur: Optional[
  142. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  143. ] = None,
  144. on_clear_server_errors: Optional[
  145. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  146. ] = None,
  147. on_click: Optional[
  148. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  149. ] = None,
  150. on_context_menu: Optional[
  151. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  152. ] = None,
  153. on_double_click: Optional[
  154. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  155. ] = None,
  156. on_focus: Optional[
  157. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  158. ] = None,
  159. on_mount: Optional[
  160. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  161. ] = None,
  162. on_mouse_down: Optional[
  163. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  164. ] = None,
  165. on_mouse_enter: Optional[
  166. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  167. ] = None,
  168. on_mouse_leave: Optional[
  169. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  170. ] = None,
  171. on_mouse_move: Optional[
  172. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  173. ] = None,
  174. on_mouse_out: Optional[
  175. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  176. ] = None,
  177. on_mouse_over: Optional[
  178. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  179. ] = None,
  180. on_mouse_up: Optional[
  181. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  182. ] = None,
  183. on_scroll: Optional[
  184. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  185. ] = None,
  186. on_submit: Optional[
  187. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  188. ] = None,
  189. on_unmount: Optional[
  190. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  191. ] = None,
  192. **props,
  193. ) -> "FormRoot":
  194. """Create a form component.
  195. Args:
  196. *children: The children of the form.
  197. as_child: Change the default rendered element for the one passed as a child.
  198. accept: MIME types the server accepts for file upload
  199. accept_charset: Character encodings to be used for form submission
  200. action: URL where the form's data should be submitted
  201. auto_complete: Whether the form should have autocomplete enabled
  202. enc_type: Encoding type for the form data when submitted
  203. method: HTTP method to use for form submission
  204. name: Name of the form
  205. no_validate: Indicates that the form should not be validated on submit
  206. target: Where to display the response after submitting the form
  207. reset_on_submit: If true, the form will be cleared after submit.
  208. handle_submit_unique_name: The name used to make this form's submit handler function unique.
  209. access_key: Provides a hint for generating a keyboard shortcut for the current element.
  210. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
  211. content_editable: Indicates whether the element's content is editable.
  212. context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
  213. dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
  214. draggable: Defines whether the element can be dragged.
  215. enter_key_hint: Hints what media types the media element is able to play.
  216. hidden: Defines whether the element is hidden.
  217. input_mode: Defines the type of the element.
  218. item_prop: Defines the name of the element for metadata purposes.
  219. lang: Defines the language used in the element.
  220. role: Defines the role of the element.
  221. slot: Assigns a slot in a shadow DOM shadow tree to an element.
  222. spell_check: Defines whether the element may be checked for spelling errors.
  223. tab_index: Defines the position of the current element in the tabbing order.
  224. title: Defines a tooltip for the element.
  225. style: The style of the component.
  226. key: A unique key for the component.
  227. id: The id for the component.
  228. class_name: The class name for the component.
  229. autofocus: Whether the component should take the focus once the page is loaded
  230. custom_attrs: custom attribute
  231. **props: The properties of the form.
  232. Returns:
  233. The form component.
  234. """
  235. ...
  236. class FormField(FormComponent):
  237. def add_style(self) -> dict[str, Any] | None: ...
  238. @overload
  239. @classmethod
  240. def create( # type: ignore
  241. cls,
  242. *children,
  243. name: Optional[Union[Var[str], str]] = None,
  244. server_invalid: Optional[Union[Var[bool], bool]] = None,
  245. as_child: Optional[Union[Var[bool], bool]] = None,
  246. style: Optional[Style] = None,
  247. key: Optional[Any] = None,
  248. id: Optional[Any] = None,
  249. class_name: Optional[Any] = None,
  250. autofocus: Optional[bool] = None,
  251. custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
  252. on_blur: Optional[
  253. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  254. ] = None,
  255. on_click: Optional[
  256. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  257. ] = None,
  258. on_context_menu: Optional[
  259. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  260. ] = None,
  261. on_double_click: Optional[
  262. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  263. ] = None,
  264. on_focus: Optional[
  265. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  266. ] = None,
  267. on_mount: Optional[
  268. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  269. ] = None,
  270. on_mouse_down: Optional[
  271. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  272. ] = None,
  273. on_mouse_enter: Optional[
  274. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  275. ] = None,
  276. on_mouse_leave: Optional[
  277. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  278. ] = None,
  279. on_mouse_move: Optional[
  280. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  281. ] = None,
  282. on_mouse_out: Optional[
  283. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  284. ] = None,
  285. on_mouse_over: Optional[
  286. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  287. ] = None,
  288. on_mouse_up: Optional[
  289. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  290. ] = None,
  291. on_scroll: Optional[
  292. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  293. ] = None,
  294. on_unmount: Optional[
  295. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  296. ] = None,
  297. **props,
  298. ) -> "FormField":
  299. """Create the component.
  300. Args:
  301. *children: The children of the component.
  302. name: The name of the form field, that is passed down to the control and used to match with validation messages.
  303. server_invalid: Flag to mark the form field as invalid, for server side validation.
  304. as_child: Change the default rendered element for the one passed as a child.
  305. style: The style of the component.
  306. key: A unique key for the component.
  307. id: The id for the component.
  308. class_name: The class name for the component.
  309. autofocus: Whether the component should take the focus once the page is loaded
  310. custom_attrs: custom attribute
  311. **props: The props of the component.
  312. Returns:
  313. The component.
  314. """
  315. ...
  316. class FormLabel(FormComponent):
  317. def add_style(self) -> dict[str, Any] | None: ...
  318. @overload
  319. @classmethod
  320. def create( # type: ignore
  321. cls,
  322. *children,
  323. as_child: Optional[Union[Var[bool], bool]] = None,
  324. style: Optional[Style] = None,
  325. key: Optional[Any] = None,
  326. id: Optional[Any] = None,
  327. class_name: Optional[Any] = None,
  328. autofocus: Optional[bool] = None,
  329. custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
  330. on_blur: Optional[
  331. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  332. ] = None,
  333. on_click: Optional[
  334. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  335. ] = None,
  336. on_context_menu: Optional[
  337. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  338. ] = None,
  339. on_double_click: Optional[
  340. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  341. ] = None,
  342. on_focus: Optional[
  343. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  344. ] = None,
  345. on_mount: Optional[
  346. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  347. ] = None,
  348. on_mouse_down: Optional[
  349. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  350. ] = None,
  351. on_mouse_enter: Optional[
  352. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  353. ] = None,
  354. on_mouse_leave: Optional[
  355. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  356. ] = None,
  357. on_mouse_move: Optional[
  358. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  359. ] = None,
  360. on_mouse_out: Optional[
  361. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  362. ] = None,
  363. on_mouse_over: Optional[
  364. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  365. ] = None,
  366. on_mouse_up: Optional[
  367. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  368. ] = None,
  369. on_scroll: Optional[
  370. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  371. ] = None,
  372. on_unmount: Optional[
  373. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  374. ] = None,
  375. **props,
  376. ) -> "FormLabel":
  377. """Create the component.
  378. Args:
  379. *children: The children of the component.
  380. as_child: Change the default rendered element for the one passed as a child.
  381. style: The style of the component.
  382. key: A unique key for the component.
  383. id: The id for the component.
  384. class_name: The class name for the component.
  385. autofocus: Whether the component should take the focus once the page is loaded
  386. custom_attrs: custom attribute
  387. **props: The props of the component.
  388. Returns:
  389. The component.
  390. """
  391. ...
  392. class FormControl(FormComponent):
  393. @overload
  394. @classmethod
  395. def create( # type: ignore
  396. cls,
  397. *children,
  398. as_child: Optional[Union[Var[bool], bool]] = None,
  399. style: Optional[Style] = None,
  400. key: Optional[Any] = None,
  401. id: Optional[Any] = None,
  402. class_name: Optional[Any] = None,
  403. autofocus: Optional[bool] = None,
  404. custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
  405. on_blur: Optional[
  406. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  407. ] = None,
  408. on_click: Optional[
  409. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  410. ] = None,
  411. on_context_menu: Optional[
  412. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  413. ] = None,
  414. on_double_click: Optional[
  415. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  416. ] = None,
  417. on_focus: Optional[
  418. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  419. ] = None,
  420. on_mount: Optional[
  421. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  422. ] = None,
  423. on_mouse_down: Optional[
  424. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  425. ] = None,
  426. on_mouse_enter: Optional[
  427. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  428. ] = None,
  429. on_mouse_leave: Optional[
  430. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  431. ] = None,
  432. on_mouse_move: Optional[
  433. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  434. ] = None,
  435. on_mouse_out: Optional[
  436. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  437. ] = None,
  438. on_mouse_over: Optional[
  439. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  440. ] = None,
  441. on_mouse_up: Optional[
  442. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  443. ] = None,
  444. on_scroll: Optional[
  445. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  446. ] = None,
  447. on_unmount: Optional[
  448. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  449. ] = None,
  450. **props,
  451. ) -> "FormControl":
  452. """Create a Form Control component.
  453. Args:
  454. *children: The children of the form.
  455. as_child: Change the default rendered element for the one passed as a child.
  456. style: The style of the component.
  457. key: A unique key for the component.
  458. id: The id for the component.
  459. class_name: The class name for the component.
  460. autofocus: Whether the component should take the focus once the page is loaded
  461. custom_attrs: custom attribute
  462. **props: The properties of the form.
  463. Raises:
  464. ValueError: If the number of children is greater than 1.
  465. TypeError: If a child exists but it is not a TextFieldInput.
  466. Returns:
  467. The form control component.
  468. """
  469. ...
  470. LiteralMatcher = Literal[
  471. "badInput",
  472. "patternMismatch",
  473. "rangeOverflow",
  474. "rangeUnderflow",
  475. "stepMismatch",
  476. "tooLong",
  477. "tooShort",
  478. "typeMismatch",
  479. "valid",
  480. "valueMissing",
  481. ]
  482. class FormMessage(FormComponent):
  483. def add_style(self) -> dict[str, Any] | None: ...
  484. @overload
  485. @classmethod
  486. def create( # type: ignore
  487. cls,
  488. *children,
  489. name: Optional[Union[Var[str], str]] = None,
  490. match: Optional[
  491. Union[
  492. Var[
  493. Literal[
  494. "badInput",
  495. "patternMismatch",
  496. "rangeOverflow",
  497. "rangeUnderflow",
  498. "stepMismatch",
  499. "tooLong",
  500. "tooShort",
  501. "typeMismatch",
  502. "valid",
  503. "valueMissing",
  504. ]
  505. ],
  506. Literal[
  507. "badInput",
  508. "patternMismatch",
  509. "rangeOverflow",
  510. "rangeUnderflow",
  511. "stepMismatch",
  512. "tooLong",
  513. "tooShort",
  514. "typeMismatch",
  515. "valid",
  516. "valueMissing",
  517. ],
  518. ]
  519. ] = None,
  520. force_match: Optional[Union[Var[bool], bool]] = None,
  521. as_child: Optional[Union[Var[bool], bool]] = None,
  522. style: Optional[Style] = None,
  523. key: Optional[Any] = None,
  524. id: Optional[Any] = None,
  525. class_name: Optional[Any] = None,
  526. autofocus: Optional[bool] = None,
  527. custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
  528. on_blur: Optional[
  529. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  530. ] = None,
  531. on_click: Optional[
  532. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  533. ] = None,
  534. on_context_menu: Optional[
  535. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  536. ] = None,
  537. on_double_click: Optional[
  538. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  539. ] = None,
  540. on_focus: Optional[
  541. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  542. ] = None,
  543. on_mount: Optional[
  544. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  545. ] = None,
  546. on_mouse_down: Optional[
  547. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  548. ] = None,
  549. on_mouse_enter: Optional[
  550. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  551. ] = None,
  552. on_mouse_leave: Optional[
  553. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  554. ] = None,
  555. on_mouse_move: Optional[
  556. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  557. ] = None,
  558. on_mouse_out: Optional[
  559. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  560. ] = None,
  561. on_mouse_over: Optional[
  562. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  563. ] = None,
  564. on_mouse_up: Optional[
  565. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  566. ] = None,
  567. on_scroll: Optional[
  568. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  569. ] = None,
  570. on_unmount: Optional[
  571. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  572. ] = None,
  573. **props,
  574. ) -> "FormMessage":
  575. """Create the component.
  576. Args:
  577. *children: The children of the component.
  578. name: Used to target a specific field by name when rendering outside of a Field part.
  579. match: Used to indicate on which condition the message should be visible.
  580. force_match: Forces the message to be shown. This is useful when using server-side validation.
  581. as_child: Change the default rendered element for the one passed as a child.
  582. style: The style of the component.
  583. key: A unique key for the component.
  584. id: The id for the component.
  585. class_name: The class name for the component.
  586. autofocus: Whether the component should take the focus once the page is loaded
  587. custom_attrs: custom attribute
  588. **props: The props of the component.
  589. Returns:
  590. The component.
  591. """
  592. ...
  593. class FormValidityState(FormComponent):
  594. @overload
  595. @classmethod
  596. def create( # type: ignore
  597. cls,
  598. *children,
  599. as_child: Optional[Union[Var[bool], bool]] = None,
  600. style: Optional[Style] = None,
  601. key: Optional[Any] = None,
  602. id: Optional[Any] = None,
  603. class_name: Optional[Any] = None,
  604. autofocus: Optional[bool] = None,
  605. custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
  606. on_blur: Optional[
  607. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  608. ] = None,
  609. on_click: Optional[
  610. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  611. ] = None,
  612. on_context_menu: Optional[
  613. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  614. ] = None,
  615. on_double_click: Optional[
  616. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  617. ] = None,
  618. on_focus: Optional[
  619. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  620. ] = None,
  621. on_mount: Optional[
  622. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  623. ] = None,
  624. on_mouse_down: Optional[
  625. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  626. ] = None,
  627. on_mouse_enter: Optional[
  628. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  629. ] = None,
  630. on_mouse_leave: Optional[
  631. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  632. ] = None,
  633. on_mouse_move: Optional[
  634. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  635. ] = None,
  636. on_mouse_out: Optional[
  637. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  638. ] = None,
  639. on_mouse_over: Optional[
  640. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  641. ] = None,
  642. on_mouse_up: Optional[
  643. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  644. ] = None,
  645. on_scroll: Optional[
  646. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  647. ] = None,
  648. on_unmount: Optional[
  649. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  650. ] = None,
  651. **props,
  652. ) -> "FormValidityState":
  653. """Create the component.
  654. Args:
  655. *children: The children of the component.
  656. as_child: Change the default rendered element for the one passed as a child.
  657. style: The style of the component.
  658. key: A unique key for the component.
  659. id: The id for the component.
  660. class_name: The class name for the component.
  661. autofocus: Whether the component should take the focus once the page is loaded
  662. custom_attrs: custom attribute
  663. **props: The props of the component.
  664. Returns:
  665. The component.
  666. """
  667. ...
  668. class FormSubmit(FormComponent):
  669. @overload
  670. @classmethod
  671. def create( # type: ignore
  672. cls,
  673. *children,
  674. as_child: Optional[Union[Var[bool], bool]] = None,
  675. style: Optional[Style] = None,
  676. key: Optional[Any] = None,
  677. id: Optional[Any] = None,
  678. class_name: Optional[Any] = None,
  679. autofocus: Optional[bool] = None,
  680. custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
  681. on_blur: Optional[
  682. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  683. ] = None,
  684. on_click: Optional[
  685. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  686. ] = None,
  687. on_context_menu: Optional[
  688. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  689. ] = None,
  690. on_double_click: Optional[
  691. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  692. ] = None,
  693. on_focus: Optional[
  694. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  695. ] = None,
  696. on_mount: Optional[
  697. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  698. ] = None,
  699. on_mouse_down: Optional[
  700. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  701. ] = None,
  702. on_mouse_enter: Optional[
  703. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  704. ] = None,
  705. on_mouse_leave: Optional[
  706. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  707. ] = None,
  708. on_mouse_move: Optional[
  709. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  710. ] = None,
  711. on_mouse_out: Optional[
  712. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  713. ] = None,
  714. on_mouse_over: Optional[
  715. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  716. ] = None,
  717. on_mouse_up: Optional[
  718. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  719. ] = None,
  720. on_scroll: Optional[
  721. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  722. ] = None,
  723. on_unmount: Optional[
  724. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  725. ] = None,
  726. **props,
  727. ) -> "FormSubmit":
  728. """Create the component.
  729. Args:
  730. *children: The children of the component.
  731. as_child: Change the default rendered element for the one passed as a child.
  732. style: The style of the component.
  733. key: A unique key for the component.
  734. id: The id for the component.
  735. class_name: The class name for the component.
  736. autofocus: Whether the component should take the focus once the page is loaded
  737. custom_attrs: custom attribute
  738. **props: The props of the component.
  739. Returns:
  740. The component.
  741. """
  742. ...
  743. class Form(FormRoot):
  744. pass
  745. @overload
  746. @classmethod
  747. def create( # type: ignore
  748. cls,
  749. *children,
  750. as_child: Optional[Union[Var[bool], bool]] = None,
  751. accept: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  752. accept_charset: Optional[
  753. Union[Var[Union[bool, int, str]], str, int, bool]
  754. ] = None,
  755. action: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  756. auto_complete: Optional[
  757. Union[Var[Union[bool, int, str]], str, int, bool]
  758. ] = None,
  759. enc_type: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  760. method: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  761. name: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  762. no_validate: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  763. target: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  764. reset_on_submit: Optional[Union[Var[bool], bool]] = None,
  765. handle_submit_unique_name: Optional[Union[Var[str], str]] = None,
  766. access_key: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  767. auto_capitalize: Optional[
  768. Union[Var[Union[bool, int, str]], str, int, bool]
  769. ] = None,
  770. content_editable: Optional[
  771. Union[Var[Union[bool, int, str]], str, int, bool]
  772. ] = None,
  773. context_menu: Optional[
  774. Union[Var[Union[bool, int, str]], str, int, bool]
  775. ] = None,
  776. dir: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  777. draggable: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  778. enter_key_hint: Optional[
  779. Union[Var[Union[bool, int, str]], str, int, bool]
  780. ] = None,
  781. hidden: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  782. input_mode: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  783. item_prop: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  784. lang: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  785. role: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  786. slot: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  787. spell_check: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  788. tab_index: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  789. title: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  790. style: Optional[Style] = None,
  791. key: Optional[Any] = None,
  792. id: Optional[Any] = None,
  793. class_name: Optional[Any] = None,
  794. autofocus: Optional[bool] = None,
  795. custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
  796. on_blur: Optional[
  797. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  798. ] = None,
  799. on_clear_server_errors: Optional[
  800. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  801. ] = None,
  802. on_click: Optional[
  803. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  804. ] = None,
  805. on_context_menu: Optional[
  806. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  807. ] = None,
  808. on_double_click: Optional[
  809. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  810. ] = None,
  811. on_focus: Optional[
  812. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  813. ] = None,
  814. on_mount: Optional[
  815. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  816. ] = None,
  817. on_mouse_down: Optional[
  818. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  819. ] = None,
  820. on_mouse_enter: Optional[
  821. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  822. ] = None,
  823. on_mouse_leave: Optional[
  824. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  825. ] = None,
  826. on_mouse_move: Optional[
  827. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  828. ] = None,
  829. on_mouse_out: Optional[
  830. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  831. ] = None,
  832. on_mouse_over: Optional[
  833. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  834. ] = None,
  835. on_mouse_up: Optional[
  836. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  837. ] = None,
  838. on_scroll: Optional[
  839. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  840. ] = None,
  841. on_submit: Optional[
  842. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  843. ] = None,
  844. on_unmount: Optional[
  845. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  846. ] = None,
  847. **props,
  848. ) -> "Form":
  849. """Create a form component.
  850. Args:
  851. *children: The children of the form.
  852. as_child: Change the default rendered element for the one passed as a child.
  853. accept: MIME types the server accepts for file upload
  854. accept_charset: Character encodings to be used for form submission
  855. action: URL where the form's data should be submitted
  856. auto_complete: Whether the form should have autocomplete enabled
  857. enc_type: Encoding type for the form data when submitted
  858. method: HTTP method to use for form submission
  859. name: Name of the form
  860. no_validate: Indicates that the form should not be validated on submit
  861. target: Where to display the response after submitting the form
  862. reset_on_submit: If true, the form will be cleared after submit.
  863. handle_submit_unique_name: The name used to make this form's submit handler function unique.
  864. access_key: Provides a hint for generating a keyboard shortcut for the current element.
  865. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
  866. content_editable: Indicates whether the element's content is editable.
  867. context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
  868. dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
  869. draggable: Defines whether the element can be dragged.
  870. enter_key_hint: Hints what media types the media element is able to play.
  871. hidden: Defines whether the element is hidden.
  872. input_mode: Defines the type of the element.
  873. item_prop: Defines the name of the element for metadata purposes.
  874. lang: Defines the language used in the element.
  875. role: Defines the role of the element.
  876. slot: Assigns a slot in a shadow DOM shadow tree to an element.
  877. spell_check: Defines whether the element may be checked for spelling errors.
  878. tab_index: Defines the position of the current element in the tabbing order.
  879. title: Defines a tooltip for the element.
  880. style: The style of the component.
  881. key: A unique key for the component.
  882. id: The id for the component.
  883. class_name: The class name for the component.
  884. autofocus: Whether the component should take the focus once the page is loaded
  885. custom_attrs: custom attribute
  886. **props: The properties of the form.
  887. Returns:
  888. The form component.
  889. """
  890. ...
  891. class FormNamespace(ComponentNamespace):
  892. root = staticmethod(FormRoot.create)
  893. control = staticmethod(FormControl.create)
  894. field = staticmethod(FormField.create)
  895. label = staticmethod(FormLabel.create)
  896. message = staticmethod(FormMessage.create)
  897. submit = staticmethod(FormSubmit.create)
  898. validity_state = staticmethod(FormValidityState.create)
  899. @staticmethod
  900. def __call__(
  901. *children,
  902. as_child: Optional[Union[Var[bool], bool]] = None,
  903. accept: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  904. accept_charset: Optional[
  905. Union[Var[Union[bool, int, str]], str, int, bool]
  906. ] = None,
  907. action: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  908. auto_complete: Optional[
  909. Union[Var[Union[bool, int, str]], str, int, bool]
  910. ] = None,
  911. enc_type: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  912. method: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  913. name: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  914. no_validate: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  915. target: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  916. reset_on_submit: Optional[Union[Var[bool], bool]] = None,
  917. handle_submit_unique_name: Optional[Union[Var[str], str]] = None,
  918. access_key: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  919. auto_capitalize: Optional[
  920. Union[Var[Union[bool, int, str]], str, int, bool]
  921. ] = None,
  922. content_editable: Optional[
  923. Union[Var[Union[bool, int, str]], str, int, bool]
  924. ] = None,
  925. context_menu: Optional[
  926. Union[Var[Union[bool, int, str]], str, int, bool]
  927. ] = None,
  928. dir: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  929. draggable: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  930. enter_key_hint: Optional[
  931. Union[Var[Union[bool, int, str]], str, int, bool]
  932. ] = None,
  933. hidden: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  934. input_mode: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  935. item_prop: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  936. lang: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  937. role: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  938. slot: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  939. spell_check: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  940. tab_index: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  941. title: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  942. style: Optional[Style] = None,
  943. key: Optional[Any] = None,
  944. id: Optional[Any] = None,
  945. class_name: Optional[Any] = None,
  946. autofocus: Optional[bool] = None,
  947. custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
  948. on_blur: Optional[
  949. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  950. ] = None,
  951. on_clear_server_errors: Optional[
  952. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  953. ] = None,
  954. on_click: Optional[
  955. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  956. ] = None,
  957. on_context_menu: Optional[
  958. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  959. ] = None,
  960. on_double_click: Optional[
  961. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  962. ] = None,
  963. on_focus: Optional[
  964. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  965. ] = None,
  966. on_mount: Optional[
  967. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  968. ] = None,
  969. on_mouse_down: Optional[
  970. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  971. ] = None,
  972. on_mouse_enter: Optional[
  973. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  974. ] = None,
  975. on_mouse_leave: Optional[
  976. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  977. ] = None,
  978. on_mouse_move: Optional[
  979. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  980. ] = None,
  981. on_mouse_out: Optional[
  982. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  983. ] = None,
  984. on_mouse_over: Optional[
  985. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  986. ] = None,
  987. on_mouse_up: Optional[
  988. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  989. ] = None,
  990. on_scroll: Optional[
  991. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  992. ] = None,
  993. on_submit: Optional[
  994. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  995. ] = None,
  996. on_unmount: Optional[
  997. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  998. ] = None,
  999. **props,
  1000. ) -> "Form":
  1001. """Create a form component.
  1002. Args:
  1003. *children: The children of the form.
  1004. as_child: Change the default rendered element for the one passed as a child.
  1005. accept: MIME types the server accepts for file upload
  1006. accept_charset: Character encodings to be used for form submission
  1007. action: URL where the form's data should be submitted
  1008. auto_complete: Whether the form should have autocomplete enabled
  1009. enc_type: Encoding type for the form data when submitted
  1010. method: HTTP method to use for form submission
  1011. name: Name of the form
  1012. no_validate: Indicates that the form should not be validated on submit
  1013. target: Where to display the response after submitting the form
  1014. reset_on_submit: If true, the form will be cleared after submit.
  1015. handle_submit_unique_name: The name used to make this form's submit handler function unique.
  1016. access_key: Provides a hint for generating a keyboard shortcut for the current element.
  1017. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
  1018. content_editable: Indicates whether the element's content is editable.
  1019. context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
  1020. dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
  1021. draggable: Defines whether the element can be dragged.
  1022. enter_key_hint: Hints what media types the media element is able to play.
  1023. hidden: Defines whether the element is hidden.
  1024. input_mode: Defines the type of the element.
  1025. item_prop: Defines the name of the element for metadata purposes.
  1026. lang: Defines the language used in the element.
  1027. role: Defines the role of the element.
  1028. slot: Assigns a slot in a shadow DOM shadow tree to an element.
  1029. spell_check: Defines whether the element may be checked for spelling errors.
  1030. tab_index: Defines the position of the current element in the tabbing order.
  1031. title: Defines a tooltip for the element.
  1032. style: The style of the component.
  1033. key: A unique key for the component.
  1034. id: The id for the component.
  1035. class_name: The class name for the component.
  1036. autofocus: Whether the component should take the focus once the page is loaded
  1037. custom_attrs: custom attribute
  1038. **props: The properties of the form.
  1039. Returns:
  1040. The form component.
  1041. """
  1042. ...
  1043. form = FormNamespace()