forms.pyi 79 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459
  1. """Stub file for reflex/components/el/elements/forms.py"""
  2. # ------------------- DO NOT EDIT ----------------------
  3. # This file was generated by `reflex/utils/pyi_generator.py`!
  4. # ------------------------------------------------------
  5. from typing import Any, Dict, Optional, Tuple, Union, overload
  6. from jinja2 import Environment
  7. from reflex.components.el.element import Element
  8. from reflex.event import EventType
  9. from reflex.style import Style
  10. from reflex.utils.imports import ImportDict
  11. from reflex.vars.base import Var
  12. from .base import BaseHTML
  13. FORM_DATA = Var(_js_expr="form_data")
  14. HANDLE_SUBMIT_JS_JINJA2 = Environment().from_string(
  15. "\n const handleSubmit_{{ handle_submit_unique_name }} = useCallback((ev) => {\n const $form = ev.target\n ev.preventDefault()\n const {{ form_data }} = {...Object.fromEntries(new FormData($form).entries()), ...{{ field_ref_mapping }}};\n\n ({{ on_submit_event_chain }}());\n\n if ({{ reset_on_submit }}) {\n $form.reset()\n }\n })\n "
  16. )
  17. class Button(BaseHTML):
  18. @overload
  19. @classmethod
  20. def create( # type: ignore
  21. cls,
  22. *children,
  23. auto_focus: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  24. disabled: Optional[Union[Var[bool], bool]] = None,
  25. form: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  26. form_action: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  27. form_enc_type: Optional[
  28. Union[Var[Union[bool, int, str]], bool, int, str]
  29. ] = None,
  30. form_method: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  31. form_no_validate: Optional[
  32. Union[Var[Union[bool, int, str]], bool, int, str]
  33. ] = None,
  34. form_target: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  35. name: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  36. type: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  37. value: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  38. access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  39. auto_capitalize: Optional[
  40. Union[Var[Union[bool, int, str]], bool, int, str]
  41. ] = None,
  42. content_editable: Optional[
  43. Union[Var[Union[bool, int, str]], bool, int, str]
  44. ] = None,
  45. context_menu: Optional[
  46. Union[Var[Union[bool, int, str]], bool, int, str]
  47. ] = None,
  48. dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  49. draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  50. enter_key_hint: Optional[
  51. Union[Var[Union[bool, int, str]], bool, int, str]
  52. ] = None,
  53. hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  54. input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  55. item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  56. lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  57. role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  58. slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  59. spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  60. tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  61. title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  62. style: Optional[Style] = None,
  63. key: Optional[Any] = None,
  64. id: Optional[Any] = None,
  65. class_name: Optional[Any] = None,
  66. autofocus: Optional[bool] = None,
  67. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  68. on_blur: Optional[EventType[[]]] = None,
  69. on_click: Optional[EventType[[]]] = None,
  70. on_context_menu: Optional[EventType[[]]] = None,
  71. on_double_click: Optional[EventType[[]]] = None,
  72. on_focus: Optional[EventType[[]]] = None,
  73. on_mount: Optional[EventType[[]]] = None,
  74. on_mouse_down: Optional[EventType[[]]] = None,
  75. on_mouse_enter: Optional[EventType[[]]] = None,
  76. on_mouse_leave: Optional[EventType[[]]] = None,
  77. on_mouse_move: Optional[EventType[[]]] = None,
  78. on_mouse_out: Optional[EventType[[]]] = None,
  79. on_mouse_over: Optional[EventType[[]]] = None,
  80. on_mouse_up: Optional[EventType[[]]] = None,
  81. on_scroll: Optional[EventType[[]]] = None,
  82. on_unmount: Optional[EventType[[]]] = None,
  83. **props,
  84. ) -> "Button":
  85. """Create the component.
  86. Args:
  87. *children: The children of the component.
  88. auto_focus: Automatically focuses the button when the page loads
  89. disabled: Disables the button
  90. form: Associates the button with a form (by id)
  91. form_action: URL to send the form data to (for type="submit" buttons)
  92. form_enc_type: How the form data should be encoded when submitting to the server (for type="submit" buttons)
  93. form_method: HTTP method to use for sending form data (for type="submit" buttons)
  94. form_no_validate: Bypasses form validation when submitting (for type="submit" buttons)
  95. form_target: Specifies where to display the response after submitting the form (for type="submit" buttons)
  96. name: Name of the button, used when sending form data
  97. type: Type of the button (submit, reset, or button)
  98. value: Value of the button, used when sending form data
  99. access_key: Provides a hint for generating a keyboard shortcut for the current element.
  100. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
  101. content_editable: Indicates whether the element's content is editable.
  102. context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
  103. dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
  104. draggable: Defines whether the element can be dragged.
  105. enter_key_hint: Hints what media types the media element is able to play.
  106. hidden: Defines whether the element is hidden.
  107. input_mode: Defines the type of the element.
  108. item_prop: Defines the name of the element for metadata purposes.
  109. lang: Defines the language used in the element.
  110. role: Defines the role of the element.
  111. slot: Assigns a slot in a shadow DOM shadow tree to an element.
  112. spell_check: Defines whether the element may be checked for spelling errors.
  113. tab_index: Defines the position of the current element in the tabbing order.
  114. title: Defines a tooltip for the element.
  115. style: The style of the component.
  116. key: A unique key for the component.
  117. id: The id for the component.
  118. class_name: The class name for the component.
  119. autofocus: Whether the component should take the focus once the page is loaded
  120. custom_attrs: custom attribute
  121. **props: The props of the component.
  122. Returns:
  123. The component.
  124. """
  125. ...
  126. class Datalist(BaseHTML):
  127. @overload
  128. @classmethod
  129. def create( # type: ignore
  130. cls,
  131. *children,
  132. access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  133. auto_capitalize: Optional[
  134. Union[Var[Union[bool, int, str]], bool, int, str]
  135. ] = None,
  136. content_editable: Optional[
  137. Union[Var[Union[bool, int, str]], bool, int, str]
  138. ] = None,
  139. context_menu: Optional[
  140. Union[Var[Union[bool, int, str]], bool, int, str]
  141. ] = None,
  142. dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  143. draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  144. enter_key_hint: Optional[
  145. Union[Var[Union[bool, int, str]], bool, int, str]
  146. ] = None,
  147. hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  148. input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  149. item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  150. lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  151. role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  152. slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  153. spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  154. tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  155. title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  156. style: Optional[Style] = None,
  157. key: Optional[Any] = None,
  158. id: Optional[Any] = None,
  159. class_name: Optional[Any] = None,
  160. autofocus: Optional[bool] = None,
  161. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  162. on_blur: Optional[EventType[[]]] = None,
  163. on_click: Optional[EventType[[]]] = None,
  164. on_context_menu: Optional[EventType[[]]] = None,
  165. on_double_click: Optional[EventType[[]]] = None,
  166. on_focus: Optional[EventType[[]]] = None,
  167. on_mount: Optional[EventType[[]]] = None,
  168. on_mouse_down: Optional[EventType[[]]] = None,
  169. on_mouse_enter: Optional[EventType[[]]] = None,
  170. on_mouse_leave: Optional[EventType[[]]] = None,
  171. on_mouse_move: Optional[EventType[[]]] = None,
  172. on_mouse_out: Optional[EventType[[]]] = None,
  173. on_mouse_over: Optional[EventType[[]]] = None,
  174. on_mouse_up: Optional[EventType[[]]] = None,
  175. on_scroll: Optional[EventType[[]]] = None,
  176. on_unmount: Optional[EventType[[]]] = None,
  177. **props,
  178. ) -> "Datalist":
  179. """Create the component.
  180. Args:
  181. *children: The children of the component.
  182. access_key: No unique attributes, only common ones are inherited Provides a hint for generating a keyboard shortcut for the current element.
  183. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
  184. content_editable: Indicates whether the element's content is editable.
  185. context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
  186. dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
  187. draggable: Defines whether the element can be dragged.
  188. enter_key_hint: Hints what media types the media element is able to play.
  189. hidden: Defines whether the element is hidden.
  190. input_mode: Defines the type of the element.
  191. item_prop: Defines the name of the element for metadata purposes.
  192. lang: Defines the language used in the element.
  193. role: Defines the role of the element.
  194. slot: Assigns a slot in a shadow DOM shadow tree to an element.
  195. spell_check: Defines whether the element may be checked for spelling errors.
  196. tab_index: Defines the position of the current element in the tabbing order.
  197. title: Defines a tooltip for the element.
  198. style: The style of the component.
  199. key: A unique key for the component.
  200. id: The id for the component.
  201. class_name: The class name for the component.
  202. autofocus: Whether the component should take the focus once the page is loaded
  203. custom_attrs: custom attribute
  204. **props: The props of the component.
  205. Returns:
  206. The component.
  207. """
  208. ...
  209. class Fieldset(Element):
  210. @overload
  211. @classmethod
  212. def create( # type: ignore
  213. cls,
  214. *children,
  215. disabled: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  216. form: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  217. name: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  218. style: Optional[Style] = None,
  219. key: Optional[Any] = None,
  220. id: Optional[Any] = None,
  221. class_name: Optional[Any] = None,
  222. autofocus: Optional[bool] = None,
  223. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  224. on_blur: Optional[EventType[[]]] = None,
  225. on_click: Optional[EventType[[]]] = None,
  226. on_context_menu: Optional[EventType[[]]] = None,
  227. on_double_click: Optional[EventType[[]]] = None,
  228. on_focus: Optional[EventType[[]]] = None,
  229. on_mount: Optional[EventType[[]]] = None,
  230. on_mouse_down: Optional[EventType[[]]] = None,
  231. on_mouse_enter: Optional[EventType[[]]] = None,
  232. on_mouse_leave: Optional[EventType[[]]] = None,
  233. on_mouse_move: Optional[EventType[[]]] = None,
  234. on_mouse_out: Optional[EventType[[]]] = None,
  235. on_mouse_over: Optional[EventType[[]]] = None,
  236. on_mouse_up: Optional[EventType[[]]] = None,
  237. on_scroll: Optional[EventType[[]]] = None,
  238. on_unmount: Optional[EventType[[]]] = None,
  239. **props,
  240. ) -> "Fieldset":
  241. """Create the component.
  242. Args:
  243. *children: The children of the component.
  244. disabled: Disables all the form control descendants of the fieldset
  245. form: Associates the fieldset with a form (by id)
  246. name: Name of the fieldset, used for scripting
  247. style: The style of the component.
  248. key: A unique key for the component.
  249. id: The id for the component.
  250. class_name: The class name for the component.
  251. autofocus: Whether the component should take the focus once the page is loaded
  252. custom_attrs: custom attribute
  253. **props: The props of the component.
  254. Returns:
  255. The component.
  256. """
  257. ...
  258. def on_submit_event_spec() -> Tuple[Var[Dict[str, Any]]]: ...
  259. def on_submit_string_event_spec() -> Tuple[Var[Dict[str, str]]]: ...
  260. class Form(BaseHTML):
  261. @overload
  262. @classmethod
  263. def create( # type: ignore
  264. cls,
  265. *children,
  266. accept: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  267. accept_charset: Optional[
  268. Union[Var[Union[bool, int, str]], bool, int, str]
  269. ] = None,
  270. action: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  271. auto_complete: Optional[
  272. Union[Var[Union[bool, int, str]], bool, int, str]
  273. ] = None,
  274. enc_type: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  275. method: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  276. name: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  277. no_validate: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  278. target: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  279. reset_on_submit: Optional[Union[Var[bool], bool]] = None,
  280. handle_submit_unique_name: Optional[Union[Var[str], str]] = None,
  281. access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  282. auto_capitalize: Optional[
  283. Union[Var[Union[bool, int, str]], bool, int, str]
  284. ] = None,
  285. content_editable: Optional[
  286. Union[Var[Union[bool, int, str]], bool, int, str]
  287. ] = None,
  288. context_menu: Optional[
  289. Union[Var[Union[bool, int, str]], bool, int, str]
  290. ] = None,
  291. dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  292. draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  293. enter_key_hint: Optional[
  294. Union[Var[Union[bool, int, str]], bool, int, str]
  295. ] = None,
  296. hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  297. input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  298. item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  299. lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  300. role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  301. slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  302. spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  303. tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  304. title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  305. style: Optional[Style] = None,
  306. key: Optional[Any] = None,
  307. id: Optional[Any] = None,
  308. class_name: Optional[Any] = None,
  309. autofocus: Optional[bool] = None,
  310. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  311. on_blur: Optional[EventType[[]]] = None,
  312. on_click: Optional[EventType[[]]] = None,
  313. on_context_menu: Optional[EventType[[]]] = None,
  314. on_double_click: Optional[EventType[[]]] = None,
  315. on_focus: Optional[EventType[[]]] = None,
  316. on_mount: Optional[EventType[[]]] = None,
  317. on_mouse_down: Optional[EventType[[]]] = None,
  318. on_mouse_enter: Optional[EventType[[]]] = None,
  319. on_mouse_leave: Optional[EventType[[]]] = None,
  320. on_mouse_move: Optional[EventType[[]]] = None,
  321. on_mouse_out: Optional[EventType[[]]] = None,
  322. on_mouse_over: Optional[EventType[[]]] = None,
  323. on_mouse_up: Optional[EventType[[]]] = None,
  324. on_scroll: Optional[EventType[[]]] = None,
  325. on_submit: Optional[
  326. Union[EventType[Dict[str, Any]], EventType[Dict[str, str]]]
  327. ] = None,
  328. on_unmount: Optional[EventType[[]]] = None,
  329. **props,
  330. ) -> "Form":
  331. """Create a form component.
  332. Args:
  333. *children: The children of the form.
  334. accept: MIME types the server accepts for file upload
  335. accept_charset: Character encodings to be used for form submission
  336. action: URL where the form's data should be submitted
  337. auto_complete: Whether the form should have autocomplete enabled
  338. enc_type: Encoding type for the form data when submitted
  339. method: HTTP method to use for form submission
  340. name: Name of the form
  341. no_validate: Indicates that the form should not be validated on submit
  342. target: Where to display the response after submitting the form
  343. reset_on_submit: If true, the form will be cleared after submit.
  344. handle_submit_unique_name: The name used to make this form's submit handler function unique.
  345. on_submit: Fired when the form is submitted
  346. access_key: Provides a hint for generating a keyboard shortcut for the current element.
  347. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
  348. content_editable: Indicates whether the element's content is editable.
  349. context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
  350. dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
  351. draggable: Defines whether the element can be dragged.
  352. enter_key_hint: Hints what media types the media element is able to play.
  353. hidden: Defines whether the element is hidden.
  354. input_mode: Defines the type of the element.
  355. item_prop: Defines the name of the element for metadata purposes.
  356. lang: Defines the language used in the element.
  357. role: Defines the role of the element.
  358. slot: Assigns a slot in a shadow DOM shadow tree to an element.
  359. spell_check: Defines whether the element may be checked for spelling errors.
  360. tab_index: Defines the position of the current element in the tabbing order.
  361. title: Defines a tooltip for the element.
  362. style: The style of the component.
  363. key: A unique key for the component.
  364. id: The id for the component.
  365. class_name: The class name for the component.
  366. autofocus: Whether the component should take the focus once the page is loaded
  367. custom_attrs: custom attribute
  368. **props: The properties of the form.
  369. Returns:
  370. The form component.
  371. """
  372. ...
  373. def add_imports(self) -> ImportDict: ...
  374. def add_hooks(self) -> list[str]: ...
  375. class Input(BaseHTML):
  376. @overload
  377. @classmethod
  378. def create( # type: ignore
  379. cls,
  380. *children,
  381. accept: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  382. alt: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  383. auto_complete: Optional[
  384. Union[Var[Union[bool, int, str]], bool, int, str]
  385. ] = None,
  386. auto_focus: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  387. capture: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  388. checked: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  389. default_checked: Optional[Union[Var[bool], bool]] = None,
  390. default_value: Optional[Union[Var[str], str]] = None,
  391. dirname: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  392. disabled: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  393. form: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  394. form_action: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  395. form_enc_type: Optional[
  396. Union[Var[Union[bool, int, str]], bool, int, str]
  397. ] = None,
  398. form_method: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  399. form_no_validate: Optional[
  400. Union[Var[Union[bool, int, str]], bool, int, str]
  401. ] = None,
  402. form_target: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  403. list: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  404. max: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  405. max_length: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  406. min_length: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  407. min: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  408. multiple: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  409. name: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  410. pattern: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  411. placeholder: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  412. read_only: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  413. required: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  414. size: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  415. src: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  416. step: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  417. type: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  418. use_map: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  419. value: Optional[Union[Var[Union[float, int, str]], float, int, str]] = None,
  420. access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  421. auto_capitalize: Optional[
  422. Union[Var[Union[bool, int, str]], bool, int, str]
  423. ] = None,
  424. content_editable: Optional[
  425. Union[Var[Union[bool, int, str]], bool, int, str]
  426. ] = None,
  427. context_menu: Optional[
  428. Union[Var[Union[bool, int, str]], bool, int, str]
  429. ] = None,
  430. dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  431. draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  432. enter_key_hint: Optional[
  433. Union[Var[Union[bool, int, str]], bool, int, str]
  434. ] = None,
  435. hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  436. input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  437. item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  438. lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  439. role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  440. slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  441. spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  442. tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  443. title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  444. style: Optional[Style] = None,
  445. key: Optional[Any] = None,
  446. id: Optional[Any] = None,
  447. class_name: Optional[Any] = None,
  448. autofocus: Optional[bool] = None,
  449. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  450. on_blur: Optional[EventType[str]] = None,
  451. on_change: Optional[EventType[str]] = None,
  452. on_click: Optional[EventType[[]]] = None,
  453. on_context_menu: Optional[EventType[[]]] = None,
  454. on_double_click: Optional[EventType[[]]] = None,
  455. on_focus: Optional[EventType[str]] = None,
  456. on_key_down: Optional[EventType[str]] = None,
  457. on_key_up: Optional[EventType[str]] = None,
  458. on_mount: Optional[EventType[[]]] = None,
  459. on_mouse_down: Optional[EventType[[]]] = None,
  460. on_mouse_enter: Optional[EventType[[]]] = None,
  461. on_mouse_leave: Optional[EventType[[]]] = None,
  462. on_mouse_move: Optional[EventType[[]]] = None,
  463. on_mouse_out: Optional[EventType[[]]] = None,
  464. on_mouse_over: Optional[EventType[[]]] = None,
  465. on_mouse_up: Optional[EventType[[]]] = None,
  466. on_scroll: Optional[EventType[[]]] = None,
  467. on_unmount: Optional[EventType[[]]] = None,
  468. **props,
  469. ) -> "Input":
  470. """Create the component.
  471. Args:
  472. *children: The children of the component.
  473. accept: Accepted types of files when the input is file type
  474. alt: Alternate text for input type="image"
  475. auto_complete: Whether the input should have autocomplete enabled
  476. auto_focus: Automatically focuses the input when the page loads
  477. capture: Captures media from the user (camera or microphone)
  478. checked: Indicates whether the input is checked (for checkboxes and radio buttons)
  479. default_checked: The initial value (for checkboxes and radio buttons)
  480. default_value: The initial value for a text field
  481. dirname: Name part of the input to submit in 'dir' and 'name' pair when form is submitted
  482. disabled: Disables the input
  483. form: Associates the input with a form (by id)
  484. form_action: URL to send the form data to (for type="submit" buttons)
  485. form_enc_type: How the form data should be encoded when submitting to the server (for type="submit" buttons)
  486. form_method: HTTP method to use for sending form data (for type="submit" buttons)
  487. form_no_validate: Bypasses form validation when submitting (for type="submit" buttons)
  488. form_target: Specifies where to display the response after submitting the form (for type="submit" buttons)
  489. list: References a datalist for suggested options
  490. max: Specifies the maximum value for the input
  491. max_length: Specifies the maximum number of characters allowed in the input
  492. min_length: Specifies the minimum number of characters required in the input
  493. min: Specifies the minimum value for the input
  494. multiple: Indicates whether multiple values can be entered in an input of the type email or file
  495. name: Name of the input, used when sending form data
  496. pattern: Regex pattern the input's value must match to be valid
  497. placeholder: Placeholder text in the input
  498. read_only: Indicates whether the input is read-only
  499. required: Indicates that the input is required
  500. size: Specifies the visible width of a text control
  501. src: URL for image inputs
  502. step: Specifies the legal number intervals for an input
  503. type: Specifies the type of input
  504. use_map: Name of the image map used with the input
  505. value: Value of the input
  506. on_change: Fired when the input value changes
  507. on_focus: Fired when the input gains focus
  508. on_blur: Fired when the input loses focus
  509. on_key_down: Fired when a key is pressed down
  510. on_key_up: Fired when a key is released
  511. access_key: Provides a hint for generating a keyboard shortcut for the current element.
  512. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
  513. content_editable: Indicates whether the element's content is editable.
  514. context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
  515. dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
  516. draggable: Defines whether the element can be dragged.
  517. enter_key_hint: Hints what media types the media element is able to play.
  518. hidden: Defines whether the element is hidden.
  519. input_mode: Defines the type of the element.
  520. item_prop: Defines the name of the element for metadata purposes.
  521. lang: Defines the language used in the element.
  522. role: Defines the role of the element.
  523. slot: Assigns a slot in a shadow DOM shadow tree to an element.
  524. spell_check: Defines whether the element may be checked for spelling errors.
  525. tab_index: Defines the position of the current element in the tabbing order.
  526. title: Defines a tooltip for the element.
  527. style: The style of the component.
  528. key: A unique key for the component.
  529. id: The id for the component.
  530. class_name: The class name for the component.
  531. autofocus: Whether the component should take the focus once the page is loaded
  532. custom_attrs: custom attribute
  533. **props: The props of the component.
  534. Returns:
  535. The component.
  536. """
  537. ...
  538. class Label(BaseHTML):
  539. @overload
  540. @classmethod
  541. def create( # type: ignore
  542. cls,
  543. *children,
  544. html_for: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  545. form: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  546. access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  547. auto_capitalize: Optional[
  548. Union[Var[Union[bool, int, str]], bool, int, str]
  549. ] = None,
  550. content_editable: Optional[
  551. Union[Var[Union[bool, int, str]], bool, int, str]
  552. ] = None,
  553. context_menu: Optional[
  554. Union[Var[Union[bool, int, str]], bool, int, str]
  555. ] = None,
  556. dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  557. draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  558. enter_key_hint: Optional[
  559. Union[Var[Union[bool, int, str]], bool, int, str]
  560. ] = None,
  561. hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  562. input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  563. item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  564. lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  565. role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  566. slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  567. spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  568. tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  569. title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  570. style: Optional[Style] = None,
  571. key: Optional[Any] = None,
  572. id: Optional[Any] = None,
  573. class_name: Optional[Any] = None,
  574. autofocus: Optional[bool] = None,
  575. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  576. on_blur: Optional[EventType[[]]] = None,
  577. on_click: Optional[EventType[[]]] = None,
  578. on_context_menu: Optional[EventType[[]]] = None,
  579. on_double_click: Optional[EventType[[]]] = None,
  580. on_focus: Optional[EventType[[]]] = None,
  581. on_mount: Optional[EventType[[]]] = None,
  582. on_mouse_down: Optional[EventType[[]]] = None,
  583. on_mouse_enter: Optional[EventType[[]]] = None,
  584. on_mouse_leave: Optional[EventType[[]]] = None,
  585. on_mouse_move: Optional[EventType[[]]] = None,
  586. on_mouse_out: Optional[EventType[[]]] = None,
  587. on_mouse_over: Optional[EventType[[]]] = None,
  588. on_mouse_up: Optional[EventType[[]]] = None,
  589. on_scroll: Optional[EventType[[]]] = None,
  590. on_unmount: Optional[EventType[[]]] = None,
  591. **props,
  592. ) -> "Label":
  593. """Create the component.
  594. Args:
  595. *children: The children of the component.
  596. html_for: ID of a form control with which the label is associated
  597. form: Associates the label with a form (by id)
  598. access_key: Provides a hint for generating a keyboard shortcut for the current element.
  599. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
  600. content_editable: Indicates whether the element's content is editable.
  601. context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
  602. dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
  603. draggable: Defines whether the element can be dragged.
  604. enter_key_hint: Hints what media types the media element is able to play.
  605. hidden: Defines whether the element is hidden.
  606. input_mode: Defines the type of the element.
  607. item_prop: Defines the name of the element for metadata purposes.
  608. lang: Defines the language used in the element.
  609. role: Defines the role of the element.
  610. slot: Assigns a slot in a shadow DOM shadow tree to an element.
  611. spell_check: Defines whether the element may be checked for spelling errors.
  612. tab_index: Defines the position of the current element in the tabbing order.
  613. title: Defines a tooltip for the element.
  614. style: The style of the component.
  615. key: A unique key for the component.
  616. id: The id for the component.
  617. class_name: The class name for the component.
  618. autofocus: Whether the component should take the focus once the page is loaded
  619. custom_attrs: custom attribute
  620. **props: The props of the component.
  621. Returns:
  622. The component.
  623. """
  624. ...
  625. class Legend(BaseHTML):
  626. @overload
  627. @classmethod
  628. def create( # type: ignore
  629. cls,
  630. *children,
  631. access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  632. auto_capitalize: Optional[
  633. Union[Var[Union[bool, int, str]], bool, int, str]
  634. ] = None,
  635. content_editable: Optional[
  636. Union[Var[Union[bool, int, str]], bool, int, str]
  637. ] = None,
  638. context_menu: Optional[
  639. Union[Var[Union[bool, int, str]], bool, int, str]
  640. ] = None,
  641. dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  642. draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  643. enter_key_hint: Optional[
  644. Union[Var[Union[bool, int, str]], bool, int, str]
  645. ] = None,
  646. hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  647. input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  648. item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  649. lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  650. role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  651. slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  652. spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  653. tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  654. title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  655. style: Optional[Style] = None,
  656. key: Optional[Any] = None,
  657. id: Optional[Any] = None,
  658. class_name: Optional[Any] = None,
  659. autofocus: Optional[bool] = None,
  660. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  661. on_blur: Optional[EventType[[]]] = None,
  662. on_click: Optional[EventType[[]]] = None,
  663. on_context_menu: Optional[EventType[[]]] = None,
  664. on_double_click: Optional[EventType[[]]] = None,
  665. on_focus: Optional[EventType[[]]] = None,
  666. on_mount: Optional[EventType[[]]] = None,
  667. on_mouse_down: Optional[EventType[[]]] = None,
  668. on_mouse_enter: Optional[EventType[[]]] = None,
  669. on_mouse_leave: Optional[EventType[[]]] = None,
  670. on_mouse_move: Optional[EventType[[]]] = None,
  671. on_mouse_out: Optional[EventType[[]]] = None,
  672. on_mouse_over: Optional[EventType[[]]] = None,
  673. on_mouse_up: Optional[EventType[[]]] = None,
  674. on_scroll: Optional[EventType[[]]] = None,
  675. on_unmount: Optional[EventType[[]]] = None,
  676. **props,
  677. ) -> "Legend":
  678. """Create the component.
  679. Args:
  680. *children: The children of the component.
  681. access_key: No unique attributes, only common ones are inherited Provides a hint for generating a keyboard shortcut for the current element.
  682. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
  683. content_editable: Indicates whether the element's content is editable.
  684. context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
  685. dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
  686. draggable: Defines whether the element can be dragged.
  687. enter_key_hint: Hints what media types the media element is able to play.
  688. hidden: Defines whether the element is hidden.
  689. input_mode: Defines the type of the element.
  690. item_prop: Defines the name of the element for metadata purposes.
  691. lang: Defines the language used in the element.
  692. role: Defines the role of the element.
  693. slot: Assigns a slot in a shadow DOM shadow tree to an element.
  694. spell_check: Defines whether the element may be checked for spelling errors.
  695. tab_index: Defines the position of the current element in the tabbing order.
  696. title: Defines a tooltip for the element.
  697. style: The style of the component.
  698. key: A unique key for the component.
  699. id: The id for the component.
  700. class_name: The class name for the component.
  701. autofocus: Whether the component should take the focus once the page is loaded
  702. custom_attrs: custom attribute
  703. **props: The props of the component.
  704. Returns:
  705. The component.
  706. """
  707. ...
  708. class Meter(BaseHTML):
  709. @overload
  710. @classmethod
  711. def create( # type: ignore
  712. cls,
  713. *children,
  714. form: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  715. high: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  716. low: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  717. max: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  718. min: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  719. optimum: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  720. value: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  721. access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  722. auto_capitalize: Optional[
  723. Union[Var[Union[bool, int, str]], bool, int, str]
  724. ] = None,
  725. content_editable: Optional[
  726. Union[Var[Union[bool, int, str]], bool, int, str]
  727. ] = None,
  728. context_menu: Optional[
  729. Union[Var[Union[bool, int, str]], bool, int, str]
  730. ] = None,
  731. dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  732. draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  733. enter_key_hint: Optional[
  734. Union[Var[Union[bool, int, str]], bool, int, str]
  735. ] = None,
  736. hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  737. input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  738. item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  739. lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  740. role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  741. slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  742. spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  743. tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  744. title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  745. style: Optional[Style] = None,
  746. key: Optional[Any] = None,
  747. id: Optional[Any] = None,
  748. class_name: Optional[Any] = None,
  749. autofocus: Optional[bool] = None,
  750. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  751. on_blur: Optional[EventType[[]]] = None,
  752. on_click: Optional[EventType[[]]] = None,
  753. on_context_menu: Optional[EventType[[]]] = None,
  754. on_double_click: Optional[EventType[[]]] = None,
  755. on_focus: Optional[EventType[[]]] = None,
  756. on_mount: Optional[EventType[[]]] = None,
  757. on_mouse_down: Optional[EventType[[]]] = None,
  758. on_mouse_enter: Optional[EventType[[]]] = None,
  759. on_mouse_leave: Optional[EventType[[]]] = None,
  760. on_mouse_move: Optional[EventType[[]]] = None,
  761. on_mouse_out: Optional[EventType[[]]] = None,
  762. on_mouse_over: Optional[EventType[[]]] = None,
  763. on_mouse_up: Optional[EventType[[]]] = None,
  764. on_scroll: Optional[EventType[[]]] = None,
  765. on_unmount: Optional[EventType[[]]] = None,
  766. **props,
  767. ) -> "Meter":
  768. """Create the component.
  769. Args:
  770. *children: The children of the component.
  771. form: Associates the meter with a form (by id)
  772. high: High limit of range (above this is considered high value)
  773. low: Low limit of range (below this is considered low value)
  774. max: Maximum value of the range
  775. min: Minimum value of the range
  776. optimum: Optimum value in the range
  777. value: Current value of the meter
  778. access_key: Provides a hint for generating a keyboard shortcut for the current element.
  779. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
  780. content_editable: Indicates whether the element's content is editable.
  781. context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
  782. dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
  783. draggable: Defines whether the element can be dragged.
  784. enter_key_hint: Hints what media types the media element is able to play.
  785. hidden: Defines whether the element is hidden.
  786. input_mode: Defines the type of the element.
  787. item_prop: Defines the name of the element for metadata purposes.
  788. lang: Defines the language used in the element.
  789. role: Defines the role of the element.
  790. slot: Assigns a slot in a shadow DOM shadow tree to an element.
  791. spell_check: Defines whether the element may be checked for spelling errors.
  792. tab_index: Defines the position of the current element in the tabbing order.
  793. title: Defines a tooltip for the element.
  794. style: The style of the component.
  795. key: A unique key for the component.
  796. id: The id for the component.
  797. class_name: The class name for the component.
  798. autofocus: Whether the component should take the focus once the page is loaded
  799. custom_attrs: custom attribute
  800. **props: The props of the component.
  801. Returns:
  802. The component.
  803. """
  804. ...
  805. class Optgroup(BaseHTML):
  806. @overload
  807. @classmethod
  808. def create( # type: ignore
  809. cls,
  810. *children,
  811. disabled: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  812. label: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  813. access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  814. auto_capitalize: Optional[
  815. Union[Var[Union[bool, int, str]], bool, int, str]
  816. ] = None,
  817. content_editable: Optional[
  818. Union[Var[Union[bool, int, str]], bool, int, str]
  819. ] = None,
  820. context_menu: Optional[
  821. Union[Var[Union[bool, int, str]], bool, int, str]
  822. ] = None,
  823. dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  824. draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  825. enter_key_hint: Optional[
  826. Union[Var[Union[bool, int, str]], bool, int, str]
  827. ] = None,
  828. hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  829. input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  830. item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  831. lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  832. role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  833. slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  834. spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  835. tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  836. title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  837. style: Optional[Style] = None,
  838. key: Optional[Any] = None,
  839. id: Optional[Any] = None,
  840. class_name: Optional[Any] = None,
  841. autofocus: Optional[bool] = None,
  842. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  843. on_blur: Optional[EventType[[]]] = None,
  844. on_click: Optional[EventType[[]]] = None,
  845. on_context_menu: Optional[EventType[[]]] = None,
  846. on_double_click: Optional[EventType[[]]] = None,
  847. on_focus: Optional[EventType[[]]] = None,
  848. on_mount: Optional[EventType[[]]] = None,
  849. on_mouse_down: Optional[EventType[[]]] = None,
  850. on_mouse_enter: Optional[EventType[[]]] = None,
  851. on_mouse_leave: Optional[EventType[[]]] = None,
  852. on_mouse_move: Optional[EventType[[]]] = None,
  853. on_mouse_out: Optional[EventType[[]]] = None,
  854. on_mouse_over: Optional[EventType[[]]] = None,
  855. on_mouse_up: Optional[EventType[[]]] = None,
  856. on_scroll: Optional[EventType[[]]] = None,
  857. on_unmount: Optional[EventType[[]]] = None,
  858. **props,
  859. ) -> "Optgroup":
  860. """Create the component.
  861. Args:
  862. *children: The children of the component.
  863. disabled: Disables the optgroup
  864. label: Label for the optgroup
  865. access_key: Provides a hint for generating a keyboard shortcut for the current element.
  866. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
  867. content_editable: Indicates whether the element's content is editable.
  868. context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
  869. dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
  870. draggable: Defines whether the element can be dragged.
  871. enter_key_hint: Hints what media types the media element is able to play.
  872. hidden: Defines whether the element is hidden.
  873. input_mode: Defines the type of the element.
  874. item_prop: Defines the name of the element for metadata purposes.
  875. lang: Defines the language used in the element.
  876. role: Defines the role of the element.
  877. slot: Assigns a slot in a shadow DOM shadow tree to an element.
  878. spell_check: Defines whether the element may be checked for spelling errors.
  879. tab_index: Defines the position of the current element in the tabbing order.
  880. title: Defines a tooltip for the element.
  881. style: The style of the component.
  882. key: A unique key for the component.
  883. id: The id for the component.
  884. class_name: The class name for the component.
  885. autofocus: Whether the component should take the focus once the page is loaded
  886. custom_attrs: custom attribute
  887. **props: The props of the component.
  888. Returns:
  889. The component.
  890. """
  891. ...
  892. class Option(BaseHTML):
  893. @overload
  894. @classmethod
  895. def create( # type: ignore
  896. cls,
  897. *children,
  898. disabled: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  899. label: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  900. selected: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  901. value: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  902. access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  903. auto_capitalize: Optional[
  904. Union[Var[Union[bool, int, str]], bool, int, str]
  905. ] = None,
  906. content_editable: Optional[
  907. Union[Var[Union[bool, int, str]], bool, int, str]
  908. ] = None,
  909. context_menu: Optional[
  910. Union[Var[Union[bool, int, str]], bool, int, str]
  911. ] = None,
  912. dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  913. draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  914. enter_key_hint: Optional[
  915. Union[Var[Union[bool, int, str]], bool, int, str]
  916. ] = None,
  917. hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  918. input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  919. item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  920. lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  921. role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  922. slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  923. spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  924. tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  925. title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  926. style: Optional[Style] = None,
  927. key: Optional[Any] = None,
  928. id: Optional[Any] = None,
  929. class_name: Optional[Any] = None,
  930. autofocus: Optional[bool] = None,
  931. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  932. on_blur: Optional[EventType[[]]] = None,
  933. on_click: Optional[EventType[[]]] = None,
  934. on_context_menu: Optional[EventType[[]]] = None,
  935. on_double_click: Optional[EventType[[]]] = None,
  936. on_focus: Optional[EventType[[]]] = None,
  937. on_mount: Optional[EventType[[]]] = None,
  938. on_mouse_down: Optional[EventType[[]]] = None,
  939. on_mouse_enter: Optional[EventType[[]]] = None,
  940. on_mouse_leave: Optional[EventType[[]]] = None,
  941. on_mouse_move: Optional[EventType[[]]] = None,
  942. on_mouse_out: Optional[EventType[[]]] = None,
  943. on_mouse_over: Optional[EventType[[]]] = None,
  944. on_mouse_up: Optional[EventType[[]]] = None,
  945. on_scroll: Optional[EventType[[]]] = None,
  946. on_unmount: Optional[EventType[[]]] = None,
  947. **props,
  948. ) -> "Option":
  949. """Create the component.
  950. Args:
  951. *children: The children of the component.
  952. disabled: Disables the option
  953. label: Label for the option, if the text is not the label
  954. selected: Indicates that the option is initially selected
  955. value: Value to be sent as form data
  956. access_key: Provides a hint for generating a keyboard shortcut for the current element.
  957. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
  958. content_editable: Indicates whether the element's content is editable.
  959. context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
  960. dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
  961. draggable: Defines whether the element can be dragged.
  962. enter_key_hint: Hints what media types the media element is able to play.
  963. hidden: Defines whether the element is hidden.
  964. input_mode: Defines the type of the element.
  965. item_prop: Defines the name of the element for metadata purposes.
  966. lang: Defines the language used in the element.
  967. role: Defines the role of the element.
  968. slot: Assigns a slot in a shadow DOM shadow tree to an element.
  969. spell_check: Defines whether the element may be checked for spelling errors.
  970. tab_index: Defines the position of the current element in the tabbing order.
  971. title: Defines a tooltip for the element.
  972. style: The style of the component.
  973. key: A unique key for the component.
  974. id: The id for the component.
  975. class_name: The class name for the component.
  976. autofocus: Whether the component should take the focus once the page is loaded
  977. custom_attrs: custom attribute
  978. **props: The props of the component.
  979. Returns:
  980. The component.
  981. """
  982. ...
  983. class Output(BaseHTML):
  984. @overload
  985. @classmethod
  986. def create( # type: ignore
  987. cls,
  988. *children,
  989. html_for: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  990. form: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  991. name: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  992. access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  993. auto_capitalize: Optional[
  994. Union[Var[Union[bool, int, str]], bool, int, str]
  995. ] = None,
  996. content_editable: Optional[
  997. Union[Var[Union[bool, int, str]], bool, int, str]
  998. ] = None,
  999. context_menu: Optional[
  1000. Union[Var[Union[bool, int, str]], bool, int, str]
  1001. ] = None,
  1002. dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1003. draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1004. enter_key_hint: Optional[
  1005. Union[Var[Union[bool, int, str]], bool, int, str]
  1006. ] = None,
  1007. hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1008. input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1009. item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1010. lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1011. role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1012. slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1013. spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1014. tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1015. title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1016. style: Optional[Style] = None,
  1017. key: Optional[Any] = None,
  1018. id: Optional[Any] = None,
  1019. class_name: Optional[Any] = None,
  1020. autofocus: Optional[bool] = None,
  1021. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  1022. on_blur: Optional[EventType[[]]] = None,
  1023. on_click: Optional[EventType[[]]] = None,
  1024. on_context_menu: Optional[EventType[[]]] = None,
  1025. on_double_click: Optional[EventType[[]]] = None,
  1026. on_focus: Optional[EventType[[]]] = None,
  1027. on_mount: Optional[EventType[[]]] = None,
  1028. on_mouse_down: Optional[EventType[[]]] = None,
  1029. on_mouse_enter: Optional[EventType[[]]] = None,
  1030. on_mouse_leave: Optional[EventType[[]]] = None,
  1031. on_mouse_move: Optional[EventType[[]]] = None,
  1032. on_mouse_out: Optional[EventType[[]]] = None,
  1033. on_mouse_over: Optional[EventType[[]]] = None,
  1034. on_mouse_up: Optional[EventType[[]]] = None,
  1035. on_scroll: Optional[EventType[[]]] = None,
  1036. on_unmount: Optional[EventType[[]]] = None,
  1037. **props,
  1038. ) -> "Output":
  1039. """Create the component.
  1040. Args:
  1041. *children: The children of the component.
  1042. html_for: Associates the output with one or more elements (by their IDs)
  1043. form: Associates the output with a form (by id)
  1044. name: Name of the output element for form submission
  1045. access_key: Provides a hint for generating a keyboard shortcut for the current element.
  1046. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
  1047. content_editable: Indicates whether the element's content is editable.
  1048. context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
  1049. dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
  1050. draggable: Defines whether the element can be dragged.
  1051. enter_key_hint: Hints what media types the media element is able to play.
  1052. hidden: Defines whether the element is hidden.
  1053. input_mode: Defines the type of the element.
  1054. item_prop: Defines the name of the element for metadata purposes.
  1055. lang: Defines the language used in the element.
  1056. role: Defines the role of the element.
  1057. slot: Assigns a slot in a shadow DOM shadow tree to an element.
  1058. spell_check: Defines whether the element may be checked for spelling errors.
  1059. tab_index: Defines the position of the current element in the tabbing order.
  1060. title: Defines a tooltip for the element.
  1061. style: The style of the component.
  1062. key: A unique key for the component.
  1063. id: The id for the component.
  1064. class_name: The class name for the component.
  1065. autofocus: Whether the component should take the focus once the page is loaded
  1066. custom_attrs: custom attribute
  1067. **props: The props of the component.
  1068. Returns:
  1069. The component.
  1070. """
  1071. ...
  1072. class Progress(BaseHTML):
  1073. @overload
  1074. @classmethod
  1075. def create( # type: ignore
  1076. cls,
  1077. *children,
  1078. form: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1079. max: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1080. value: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1081. access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1082. auto_capitalize: Optional[
  1083. Union[Var[Union[bool, int, str]], bool, int, str]
  1084. ] = None,
  1085. content_editable: Optional[
  1086. Union[Var[Union[bool, int, str]], bool, int, str]
  1087. ] = None,
  1088. context_menu: Optional[
  1089. Union[Var[Union[bool, int, str]], bool, int, str]
  1090. ] = None,
  1091. dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1092. draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1093. enter_key_hint: Optional[
  1094. Union[Var[Union[bool, int, str]], bool, int, str]
  1095. ] = None,
  1096. hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1097. input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1098. item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1099. lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1100. role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1101. slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1102. spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1103. tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1104. title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1105. style: Optional[Style] = None,
  1106. key: Optional[Any] = None,
  1107. id: Optional[Any] = None,
  1108. class_name: Optional[Any] = None,
  1109. autofocus: Optional[bool] = None,
  1110. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  1111. on_blur: Optional[EventType[[]]] = None,
  1112. on_click: Optional[EventType[[]]] = None,
  1113. on_context_menu: Optional[EventType[[]]] = None,
  1114. on_double_click: Optional[EventType[[]]] = None,
  1115. on_focus: Optional[EventType[[]]] = None,
  1116. on_mount: Optional[EventType[[]]] = None,
  1117. on_mouse_down: Optional[EventType[[]]] = None,
  1118. on_mouse_enter: Optional[EventType[[]]] = None,
  1119. on_mouse_leave: Optional[EventType[[]]] = None,
  1120. on_mouse_move: Optional[EventType[[]]] = None,
  1121. on_mouse_out: Optional[EventType[[]]] = None,
  1122. on_mouse_over: Optional[EventType[[]]] = None,
  1123. on_mouse_up: Optional[EventType[[]]] = None,
  1124. on_scroll: Optional[EventType[[]]] = None,
  1125. on_unmount: Optional[EventType[[]]] = None,
  1126. **props,
  1127. ) -> "Progress":
  1128. """Create the component.
  1129. Args:
  1130. *children: The children of the component.
  1131. form: Associates the progress element with a form (by id)
  1132. max: Maximum value of the progress indicator
  1133. value: Current value of the progress indicator
  1134. access_key: Provides a hint for generating a keyboard shortcut for the current element.
  1135. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
  1136. content_editable: Indicates whether the element's content is editable.
  1137. context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
  1138. dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
  1139. draggable: Defines whether the element can be dragged.
  1140. enter_key_hint: Hints what media types the media element is able to play.
  1141. hidden: Defines whether the element is hidden.
  1142. input_mode: Defines the type of the element.
  1143. item_prop: Defines the name of the element for metadata purposes.
  1144. lang: Defines the language used in the element.
  1145. role: Defines the role of the element.
  1146. slot: Assigns a slot in a shadow DOM shadow tree to an element.
  1147. spell_check: Defines whether the element may be checked for spelling errors.
  1148. tab_index: Defines the position of the current element in the tabbing order.
  1149. title: Defines a tooltip for the element.
  1150. style: The style of the component.
  1151. key: A unique key for the component.
  1152. id: The id for the component.
  1153. class_name: The class name for the component.
  1154. autofocus: Whether the component should take the focus once the page is loaded
  1155. custom_attrs: custom attribute
  1156. **props: The props of the component.
  1157. Returns:
  1158. The component.
  1159. """
  1160. ...
  1161. class Select(BaseHTML):
  1162. @overload
  1163. @classmethod
  1164. def create( # type: ignore
  1165. cls,
  1166. *children,
  1167. auto_complete: Optional[
  1168. Union[Var[Union[bool, int, str]], bool, int, str]
  1169. ] = None,
  1170. auto_focus: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1171. disabled: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1172. form: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1173. multiple: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1174. name: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1175. required: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1176. size: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1177. access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1178. auto_capitalize: Optional[
  1179. Union[Var[Union[bool, int, str]], bool, int, str]
  1180. ] = None,
  1181. content_editable: Optional[
  1182. Union[Var[Union[bool, int, str]], bool, int, str]
  1183. ] = None,
  1184. context_menu: Optional[
  1185. Union[Var[Union[bool, int, str]], bool, int, str]
  1186. ] = None,
  1187. dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1188. draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1189. enter_key_hint: Optional[
  1190. Union[Var[Union[bool, int, str]], bool, int, str]
  1191. ] = None,
  1192. hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1193. input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1194. item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1195. lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1196. role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1197. slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1198. spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1199. tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1200. title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1201. style: Optional[Style] = None,
  1202. key: Optional[Any] = None,
  1203. id: Optional[Any] = None,
  1204. class_name: Optional[Any] = None,
  1205. autofocus: Optional[bool] = None,
  1206. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  1207. on_blur: Optional[EventType[[]]] = None,
  1208. on_change: Optional[EventType[str]] = None,
  1209. on_click: Optional[EventType[[]]] = None,
  1210. on_context_menu: Optional[EventType[[]]] = None,
  1211. on_double_click: Optional[EventType[[]]] = None,
  1212. on_focus: Optional[EventType[[]]] = None,
  1213. on_mount: Optional[EventType[[]]] = None,
  1214. on_mouse_down: Optional[EventType[[]]] = None,
  1215. on_mouse_enter: Optional[EventType[[]]] = None,
  1216. on_mouse_leave: Optional[EventType[[]]] = None,
  1217. on_mouse_move: Optional[EventType[[]]] = None,
  1218. on_mouse_out: Optional[EventType[[]]] = None,
  1219. on_mouse_over: Optional[EventType[[]]] = None,
  1220. on_mouse_up: Optional[EventType[[]]] = None,
  1221. on_scroll: Optional[EventType[[]]] = None,
  1222. on_unmount: Optional[EventType[[]]] = None,
  1223. **props,
  1224. ) -> "Select":
  1225. """Create the component.
  1226. Args:
  1227. *children: The children of the component.
  1228. auto_complete: Whether the form control should have autocomplete enabled
  1229. auto_focus: Automatically focuses the select when the page loads
  1230. disabled: Disables the select control
  1231. form: Associates the select with a form (by id)
  1232. multiple: Indicates that multiple options can be selected
  1233. name: Name of the select, used when submitting the form
  1234. required: Indicates that the select control must have a selected option
  1235. size: Number of visible options in a drop-down list
  1236. on_change: Fired when the select value changes
  1237. access_key: Provides a hint for generating a keyboard shortcut for the current element.
  1238. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
  1239. content_editable: Indicates whether the element's content is editable.
  1240. context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
  1241. dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
  1242. draggable: Defines whether the element can be dragged.
  1243. enter_key_hint: Hints what media types the media element is able to play.
  1244. hidden: Defines whether the element is hidden.
  1245. input_mode: Defines the type of the element.
  1246. item_prop: Defines the name of the element for metadata purposes.
  1247. lang: Defines the language used in the element.
  1248. role: Defines the role of the element.
  1249. slot: Assigns a slot in a shadow DOM shadow tree to an element.
  1250. spell_check: Defines whether the element may be checked for spelling errors.
  1251. tab_index: Defines the position of the current element in the tabbing order.
  1252. title: Defines a tooltip for the element.
  1253. style: The style of the component.
  1254. key: A unique key for the component.
  1255. id: The id for the component.
  1256. class_name: The class name for the component.
  1257. autofocus: Whether the component should take the focus once the page is loaded
  1258. custom_attrs: custom attribute
  1259. **props: The props of the component.
  1260. Returns:
  1261. The component.
  1262. """
  1263. ...
  1264. AUTO_HEIGHT_JS = '\nconst autoHeightOnInput = (e, is_enabled) => {\n if (is_enabled) {\n const el = e.target;\n el.style.overflowY = "scroll";\n el.style.height = "auto";\n el.style.height = (e.target.scrollHeight) + "px";\n if (el.form && !el.form.data_resize_on_reset) {\n el.form.addEventListener("reset", () => window.setTimeout(() => autoHeightOnInput(e, is_enabled), 0))\n el.form.data_resize_on_reset = true;\n }\n }\n}\n'
  1265. ENTER_KEY_SUBMIT_JS = "\nconst enterKeySubmitOnKeyDown = (e, is_enabled) => {\n if (is_enabled && e.which === 13 && !e.shiftKey) {\n e.preventDefault();\n if (!e.repeat) {\n if (e.target.form) {\n e.target.form.requestSubmit();\n }\n }\n }\n}\n"
  1266. class Textarea(BaseHTML):
  1267. @overload
  1268. @classmethod
  1269. def create( # type: ignore
  1270. cls,
  1271. *children,
  1272. auto_complete: Optional[
  1273. Union[Var[Union[bool, int, str]], bool, int, str]
  1274. ] = None,
  1275. auto_focus: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1276. auto_height: Optional[Union[Var[bool], bool]] = None,
  1277. cols: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1278. dirname: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1279. disabled: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1280. enter_key_submit: Optional[Union[Var[bool], bool]] = None,
  1281. form: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1282. max_length: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1283. min_length: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1284. name: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1285. placeholder: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1286. read_only: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1287. required: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1288. rows: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1289. value: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1290. wrap: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1291. access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1292. auto_capitalize: Optional[
  1293. Union[Var[Union[bool, int, str]], bool, int, str]
  1294. ] = None,
  1295. content_editable: Optional[
  1296. Union[Var[Union[bool, int, str]], bool, int, str]
  1297. ] = None,
  1298. context_menu: Optional[
  1299. Union[Var[Union[bool, int, str]], bool, int, str]
  1300. ] = None,
  1301. dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1302. draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1303. enter_key_hint: Optional[
  1304. Union[Var[Union[bool, int, str]], bool, int, str]
  1305. ] = None,
  1306. hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1307. input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1308. item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1309. lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1310. role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1311. slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1312. spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1313. tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1314. title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1315. style: Optional[Style] = None,
  1316. key: Optional[Any] = None,
  1317. id: Optional[Any] = None,
  1318. class_name: Optional[Any] = None,
  1319. autofocus: Optional[bool] = None,
  1320. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  1321. on_blur: Optional[EventType[str]] = None,
  1322. on_change: Optional[EventType[str]] = None,
  1323. on_click: Optional[EventType[[]]] = None,
  1324. on_context_menu: Optional[EventType[[]]] = None,
  1325. on_double_click: Optional[EventType[[]]] = None,
  1326. on_focus: Optional[EventType[str]] = None,
  1327. on_key_down: Optional[EventType[str]] = None,
  1328. on_key_up: Optional[EventType[str]] = None,
  1329. on_mount: Optional[EventType[[]]] = None,
  1330. on_mouse_down: Optional[EventType[[]]] = None,
  1331. on_mouse_enter: Optional[EventType[[]]] = None,
  1332. on_mouse_leave: Optional[EventType[[]]] = None,
  1333. on_mouse_move: Optional[EventType[[]]] = None,
  1334. on_mouse_out: Optional[EventType[[]]] = None,
  1335. on_mouse_over: Optional[EventType[[]]] = None,
  1336. on_mouse_up: Optional[EventType[[]]] = None,
  1337. on_scroll: Optional[EventType[[]]] = None,
  1338. on_unmount: Optional[EventType[[]]] = None,
  1339. **props,
  1340. ) -> "Textarea":
  1341. """Create a textarea component.
  1342. Args:
  1343. *children: The children of the textarea.
  1344. auto_complete: Whether the form control should have autocomplete enabled
  1345. auto_focus: Automatically focuses the textarea when the page loads
  1346. auto_height: Automatically fit the content height to the text (use min-height with this prop)
  1347. cols: Visible width of the text control, in average character widths
  1348. dirname: Name part of the textarea to submit in 'dir' and 'name' pair when form is submitted
  1349. disabled: Disables the textarea
  1350. enter_key_submit: Enter key submits form (shift-enter adds new line)
  1351. form: Associates the textarea with a form (by id)
  1352. max_length: Maximum number of characters allowed in the textarea
  1353. min_length: Minimum number of characters required in the textarea
  1354. name: Name of the textarea, used when submitting the form
  1355. placeholder: Placeholder text in the textarea
  1356. read_only: Indicates whether the textarea is read-only
  1357. required: Indicates that the textarea is required
  1358. rows: Visible number of lines in the text control
  1359. value: The controlled value of the textarea, read only unless used with on_change
  1360. wrap: How the text in the textarea is to be wrapped when submitting the form
  1361. on_change: Fired when the input value changes
  1362. on_focus: Fired when the input gains focus
  1363. on_blur: Fired when the input loses focus
  1364. on_key_down: Fired when a key is pressed down
  1365. on_key_up: Fired when a key is released
  1366. access_key: Provides a hint for generating a keyboard shortcut for the current element.
  1367. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
  1368. content_editable: Indicates whether the element's content is editable.
  1369. context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
  1370. dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
  1371. draggable: Defines whether the element can be dragged.
  1372. enter_key_hint: Hints what media types the media element is able to play.
  1373. hidden: Defines whether the element is hidden.
  1374. input_mode: Defines the type of the element.
  1375. item_prop: Defines the name of the element for metadata purposes.
  1376. lang: Defines the language used in the element.
  1377. role: Defines the role of the element.
  1378. slot: Assigns a slot in a shadow DOM shadow tree to an element.
  1379. spell_check: Defines whether the element may be checked for spelling errors.
  1380. tab_index: Defines the position of the current element in the tabbing order.
  1381. title: Defines a tooltip for the element.
  1382. style: The style of the component.
  1383. key: A unique key for the component.
  1384. id: The id for the component.
  1385. class_name: The class name for the component.
  1386. autofocus: Whether the component should take the focus once the page is loaded
  1387. custom_attrs: custom attribute
  1388. **props: The properties of the textarea.
  1389. Returns:
  1390. The textarea component.
  1391. Raises:
  1392. ValueError: when `enter_key_submit` is combined with `on_key_down`.
  1393. """
  1394. ...
  1395. button = Button.create
  1396. fieldset = Fieldset.create
  1397. form = Form.create
  1398. input = Input.create
  1399. label = Label.create
  1400. legend = Legend.create
  1401. meter = Meter.create
  1402. optgroup = Optgroup.create
  1403. option = Option.create
  1404. output = Output.create
  1405. progress = Progress.create
  1406. select = Select.create
  1407. textarea = Textarea.create