1
0

forms.pyi 80 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473
  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, KeyInputInfo
  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, Any]]] = 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, Any]]] = 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: 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, Any]]] = 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, Any]]] = 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[
  327. Union[EventType[()], EventType[dict[str, Any]]],
  328. Union[EventType[()], EventType[dict[str, str]]],
  329. ]
  330. ] = None,
  331. on_unmount: Optional[EventType[()]] = None,
  332. **props,
  333. ) -> "Form":
  334. """Create a form component.
  335. Args:
  336. *children: The children of the form.
  337. accept: MIME types the server accepts for file upload
  338. accept_charset: Character encodings to be used for form submission
  339. action: URL where the form's data should be submitted
  340. auto_complete: Whether the form should have autocomplete enabled
  341. enc_type: Encoding type for the form data when submitted
  342. method: HTTP method to use for form submission
  343. name: Name of the form
  344. no_validate: Indicates that the form should not be validated on submit
  345. target: Where to display the response after submitting the form
  346. reset_on_submit: If true, the form will be cleared after submit.
  347. handle_submit_unique_name: The name used to make this form's submit handler function unique.
  348. on_submit: Fired when the form is submitted
  349. access_key: Provides a hint for generating a keyboard shortcut for the current element.
  350. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
  351. content_editable: Indicates whether the element's content is editable.
  352. context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
  353. dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
  354. draggable: Defines whether the element can be dragged.
  355. enter_key_hint: Hints what media types the media element is able to play.
  356. hidden: Defines whether the element is hidden.
  357. input_mode: Defines the type of the element.
  358. item_prop: Defines the name of the element for metadata purposes.
  359. lang: Defines the language used in the element.
  360. role: Defines the role of the element.
  361. slot: Assigns a slot in a shadow DOM shadow tree to an element.
  362. spell_check: Defines whether the element may be checked for spelling errors.
  363. tab_index: Defines the position of the current element in the tabbing order.
  364. title: Defines a tooltip for the element.
  365. style: The style of the component.
  366. key: A unique key for the component.
  367. id: The id for the component.
  368. class_name: The class name for the component.
  369. autofocus: Whether the component should take the focus once the page is loaded
  370. custom_attrs: custom attribute
  371. **props: The properties of the form.
  372. Returns:
  373. The form component.
  374. """
  375. ...
  376. def add_imports(self) -> ImportDict: ...
  377. def add_hooks(self) -> list[str]: ...
  378. class Input(BaseHTML):
  379. @overload
  380. @classmethod
  381. def create( # type: ignore
  382. cls,
  383. *children,
  384. accept: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  385. alt: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  386. auto_complete: Optional[
  387. Union[Var[Union[bool, int, str]], bool, int, str]
  388. ] = None,
  389. auto_focus: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  390. capture: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  391. checked: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  392. default_checked: Optional[Union[Var[bool], bool]] = None,
  393. default_value: Optional[Union[Var[str], str]] = None,
  394. dirname: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  395. disabled: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  396. form: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  397. form_action: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  398. form_enc_type: Optional[
  399. Union[Var[Union[bool, int, str]], bool, int, str]
  400. ] = None,
  401. form_method: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  402. form_no_validate: Optional[
  403. Union[Var[Union[bool, int, str]], bool, int, str]
  404. ] = None,
  405. form_target: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  406. list: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  407. max: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  408. max_length: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  409. min_length: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  410. min: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  411. multiple: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  412. name: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  413. pattern: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  414. placeholder: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  415. read_only: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  416. required: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  417. size: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  418. src: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  419. step: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  420. type: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  421. use_map: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  422. value: Optional[Union[Var[Union[float, int, str]], float, int, str]] = None,
  423. access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  424. auto_capitalize: Optional[
  425. Union[Var[Union[bool, int, str]], bool, int, str]
  426. ] = None,
  427. content_editable: Optional[
  428. Union[Var[Union[bool, int, str]], bool, int, str]
  429. ] = None,
  430. context_menu: Optional[
  431. Union[Var[Union[bool, int, str]], bool, int, str]
  432. ] = None,
  433. dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  434. draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  435. enter_key_hint: Optional[
  436. Union[Var[Union[bool, int, str]], bool, int, str]
  437. ] = None,
  438. hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  439. input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  440. item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  441. lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  442. role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  443. slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  444. spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  445. tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  446. title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  447. style: Optional[Style] = None,
  448. key: Optional[Any] = None,
  449. id: Optional[Any] = None,
  450. class_name: Optional[Any] = None,
  451. autofocus: Optional[bool] = None,
  452. custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
  453. on_blur: Optional[Union[EventType[()], EventType[str]]] = None,
  454. on_change: Optional[Union[EventType[()], EventType[str]]] = None,
  455. on_click: Optional[EventType[()]] = None,
  456. on_context_menu: Optional[EventType[()]] = None,
  457. on_double_click: Optional[EventType[()]] = None,
  458. on_focus: Optional[Union[EventType[()], EventType[str]]] = None,
  459. on_key_down: Optional[
  460. Union[EventType[()], EventType[str], EventType[str, KeyInputInfo]]
  461. ] = None,
  462. on_key_up: Optional[
  463. Union[EventType[()], EventType[str], EventType[str, KeyInputInfo]]
  464. ] = None,
  465. on_mount: Optional[EventType[()]] = None,
  466. on_mouse_down: Optional[EventType[()]] = None,
  467. on_mouse_enter: Optional[EventType[()]] = None,
  468. on_mouse_leave: Optional[EventType[()]] = None,
  469. on_mouse_move: Optional[EventType[()]] = None,
  470. on_mouse_out: Optional[EventType[()]] = None,
  471. on_mouse_over: Optional[EventType[()]] = None,
  472. on_mouse_up: Optional[EventType[()]] = None,
  473. on_scroll: Optional[EventType[()]] = None,
  474. on_unmount: Optional[EventType[()]] = None,
  475. **props,
  476. ) -> "Input":
  477. """Create an Input component.
  478. Args:
  479. *children: The children of the component.
  480. accept: Accepted types of files when the input is file type
  481. alt: Alternate text for input type="image"
  482. auto_complete: Whether the input should have autocomplete enabled
  483. auto_focus: Automatically focuses the input when the page loads
  484. capture: Captures media from the user (camera or microphone)
  485. checked: Indicates whether the input is checked (for checkboxes and radio buttons)
  486. default_checked: The initial value (for checkboxes and radio buttons)
  487. default_value: The initial value for a text field
  488. dirname: Name part of the input to submit in 'dir' and 'name' pair when form is submitted
  489. disabled: Disables the input
  490. form: Associates the input with a form (by id)
  491. form_action: URL to send the form data to (for type="submit" buttons)
  492. form_enc_type: How the form data should be encoded when submitting to the server (for type="submit" buttons)
  493. form_method: HTTP method to use for sending form data (for type="submit" buttons)
  494. form_no_validate: Bypasses form validation when submitting (for type="submit" buttons)
  495. form_target: Specifies where to display the response after submitting the form (for type="submit" buttons)
  496. list: References a datalist for suggested options
  497. max: Specifies the maximum value for the input
  498. max_length: Specifies the maximum number of characters allowed in the input
  499. min_length: Specifies the minimum number of characters required in the input
  500. min: Specifies the minimum value for the input
  501. multiple: Indicates whether multiple values can be entered in an input of the type email or file
  502. name: Name of the input, used when sending form data
  503. pattern: Regex pattern the input's value must match to be valid
  504. placeholder: Placeholder text in the input
  505. read_only: Indicates whether the input is read-only
  506. required: Indicates that the input is required
  507. size: Specifies the visible width of a text control
  508. src: URL for image inputs
  509. step: Specifies the legal number intervals for an input
  510. type: Specifies the type of input
  511. use_map: Name of the image map used with the input
  512. value: Value of the input
  513. on_change: Fired when the input value changes
  514. on_focus: Fired when the input gains focus
  515. on_blur: Fired when the input loses focus
  516. on_key_down: Fired when a key is pressed down
  517. on_key_up: Fired when a key is released
  518. access_key: Provides a hint for generating a keyboard shortcut for the current element.
  519. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
  520. content_editable: Indicates whether the element's content is editable.
  521. context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
  522. dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
  523. draggable: Defines whether the element can be dragged.
  524. enter_key_hint: Hints what media types the media element is able to play.
  525. hidden: Defines whether the element is hidden.
  526. input_mode: Defines the type of the element.
  527. item_prop: Defines the name of the element for metadata purposes.
  528. lang: Defines the language used in the element.
  529. role: Defines the role of the element.
  530. slot: Assigns a slot in a shadow DOM shadow tree to an element.
  531. spell_check: Defines whether the element may be checked for spelling errors.
  532. tab_index: Defines the position of the current element in the tabbing order.
  533. title: Defines a tooltip for the element.
  534. style: The style of the component.
  535. key: A unique key for the component.
  536. id: The id for the component.
  537. class_name: The class name for the component.
  538. autofocus: Whether the component should take the focus once the page is loaded
  539. custom_attrs: custom attribute
  540. **props: The properties of the component.
  541. Returns:
  542. The component.
  543. """
  544. ...
  545. class Label(BaseHTML):
  546. @overload
  547. @classmethod
  548. def create( # type: ignore
  549. cls,
  550. *children,
  551. html_for: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  552. form: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  553. access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  554. auto_capitalize: Optional[
  555. Union[Var[Union[bool, int, str]], bool, int, str]
  556. ] = None,
  557. content_editable: Optional[
  558. Union[Var[Union[bool, int, str]], bool, int, str]
  559. ] = None,
  560. context_menu: Optional[
  561. Union[Var[Union[bool, int, str]], bool, int, str]
  562. ] = None,
  563. dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  564. draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  565. enter_key_hint: Optional[
  566. Union[Var[Union[bool, int, str]], bool, int, str]
  567. ] = None,
  568. hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  569. input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  570. item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  571. lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  572. role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  573. slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  574. spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  575. tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  576. title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  577. style: Optional[Style] = None,
  578. key: Optional[Any] = None,
  579. id: Optional[Any] = None,
  580. class_name: Optional[Any] = None,
  581. autofocus: Optional[bool] = None,
  582. custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
  583. on_blur: Optional[EventType[()]] = None,
  584. on_click: Optional[EventType[()]] = None,
  585. on_context_menu: Optional[EventType[()]] = None,
  586. on_double_click: Optional[EventType[()]] = None,
  587. on_focus: Optional[EventType[()]] = None,
  588. on_mount: Optional[EventType[()]] = None,
  589. on_mouse_down: Optional[EventType[()]] = None,
  590. on_mouse_enter: Optional[EventType[()]] = None,
  591. on_mouse_leave: Optional[EventType[()]] = None,
  592. on_mouse_move: Optional[EventType[()]] = None,
  593. on_mouse_out: Optional[EventType[()]] = None,
  594. on_mouse_over: Optional[EventType[()]] = None,
  595. on_mouse_up: Optional[EventType[()]] = None,
  596. on_scroll: Optional[EventType[()]] = None,
  597. on_unmount: Optional[EventType[()]] = None,
  598. **props,
  599. ) -> "Label":
  600. """Create the component.
  601. Args:
  602. *children: The children of the component.
  603. html_for: ID of a form control with which the label is associated
  604. form: Associates the label with a form (by id)
  605. access_key: Provides a hint for generating a keyboard shortcut for the current element.
  606. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
  607. content_editable: Indicates whether the element's content is editable.
  608. context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
  609. dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
  610. draggable: Defines whether the element can be dragged.
  611. enter_key_hint: Hints what media types the media element is able to play.
  612. hidden: Defines whether the element is hidden.
  613. input_mode: Defines the type of the element.
  614. item_prop: Defines the name of the element for metadata purposes.
  615. lang: Defines the language used in the element.
  616. role: Defines the role of the element.
  617. slot: Assigns a slot in a shadow DOM shadow tree to an element.
  618. spell_check: Defines whether the element may be checked for spelling errors.
  619. tab_index: Defines the position of the current element in the tabbing order.
  620. title: Defines a tooltip for the element.
  621. style: The style of the component.
  622. key: A unique key for the component.
  623. id: The id for the component.
  624. class_name: The class name for the component.
  625. autofocus: Whether the component should take the focus once the page is loaded
  626. custom_attrs: custom attribute
  627. **props: The props of the component.
  628. Returns:
  629. The component.
  630. """
  631. ...
  632. class Legend(BaseHTML):
  633. @overload
  634. @classmethod
  635. def create( # type: ignore
  636. cls,
  637. *children,
  638. access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  639. auto_capitalize: Optional[
  640. Union[Var[Union[bool, int, str]], bool, int, str]
  641. ] = None,
  642. content_editable: Optional[
  643. Union[Var[Union[bool, int, str]], bool, int, str]
  644. ] = None,
  645. context_menu: Optional[
  646. Union[Var[Union[bool, int, str]], bool, int, str]
  647. ] = None,
  648. dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  649. draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  650. enter_key_hint: Optional[
  651. Union[Var[Union[bool, int, str]], bool, int, str]
  652. ] = None,
  653. hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  654. input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  655. item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  656. lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  657. role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  658. slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  659. spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  660. tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  661. title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  662. style: Optional[Style] = None,
  663. key: Optional[Any] = None,
  664. id: Optional[Any] = None,
  665. class_name: Optional[Any] = None,
  666. autofocus: Optional[bool] = None,
  667. custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
  668. on_blur: Optional[EventType[()]] = None,
  669. on_click: Optional[EventType[()]] = None,
  670. on_context_menu: Optional[EventType[()]] = None,
  671. on_double_click: Optional[EventType[()]] = None,
  672. on_focus: Optional[EventType[()]] = None,
  673. on_mount: Optional[EventType[()]] = None,
  674. on_mouse_down: Optional[EventType[()]] = None,
  675. on_mouse_enter: Optional[EventType[()]] = None,
  676. on_mouse_leave: Optional[EventType[()]] = None,
  677. on_mouse_move: Optional[EventType[()]] = None,
  678. on_mouse_out: Optional[EventType[()]] = None,
  679. on_mouse_over: Optional[EventType[()]] = None,
  680. on_mouse_up: Optional[EventType[()]] = None,
  681. on_scroll: Optional[EventType[()]] = None,
  682. on_unmount: Optional[EventType[()]] = None,
  683. **props,
  684. ) -> "Legend":
  685. """Create the component.
  686. Args:
  687. *children: The children of the component.
  688. access_key: Provides a hint for generating a keyboard shortcut for the current element.
  689. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
  690. content_editable: Indicates whether the element's content is editable.
  691. context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
  692. dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
  693. draggable: Defines whether the element can be dragged.
  694. enter_key_hint: Hints what media types the media element is able to play.
  695. hidden: Defines whether the element is hidden.
  696. input_mode: Defines the type of the element.
  697. item_prop: Defines the name of the element for metadata purposes.
  698. lang: Defines the language used in the element.
  699. role: Defines the role of the element.
  700. slot: Assigns a slot in a shadow DOM shadow tree to an element.
  701. spell_check: Defines whether the element may be checked for spelling errors.
  702. tab_index: Defines the position of the current element in the tabbing order.
  703. title: Defines a tooltip for the element.
  704. style: The style of the component.
  705. key: A unique key for the component.
  706. id: The id for the component.
  707. class_name: The class name for the component.
  708. autofocus: Whether the component should take the focus once the page is loaded
  709. custom_attrs: custom attribute
  710. **props: The props of the component.
  711. Returns:
  712. The component.
  713. """
  714. ...
  715. class Meter(BaseHTML):
  716. @overload
  717. @classmethod
  718. def create( # type: ignore
  719. cls,
  720. *children,
  721. form: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  722. high: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  723. low: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  724. max: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  725. min: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  726. optimum: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  727. value: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  728. access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  729. auto_capitalize: Optional[
  730. Union[Var[Union[bool, int, str]], bool, int, str]
  731. ] = None,
  732. content_editable: Optional[
  733. Union[Var[Union[bool, int, str]], bool, int, str]
  734. ] = None,
  735. context_menu: Optional[
  736. Union[Var[Union[bool, int, str]], bool, int, str]
  737. ] = None,
  738. dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  739. draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  740. enter_key_hint: Optional[
  741. Union[Var[Union[bool, int, str]], bool, int, str]
  742. ] = None,
  743. hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  744. input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  745. item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  746. lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  747. role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  748. slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  749. spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  750. tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  751. title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  752. style: Optional[Style] = None,
  753. key: Optional[Any] = None,
  754. id: Optional[Any] = None,
  755. class_name: Optional[Any] = None,
  756. autofocus: Optional[bool] = None,
  757. custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
  758. on_blur: Optional[EventType[()]] = None,
  759. on_click: Optional[EventType[()]] = None,
  760. on_context_menu: Optional[EventType[()]] = None,
  761. on_double_click: Optional[EventType[()]] = None,
  762. on_focus: Optional[EventType[()]] = None,
  763. on_mount: Optional[EventType[()]] = None,
  764. on_mouse_down: Optional[EventType[()]] = None,
  765. on_mouse_enter: Optional[EventType[()]] = None,
  766. on_mouse_leave: Optional[EventType[()]] = None,
  767. on_mouse_move: Optional[EventType[()]] = None,
  768. on_mouse_out: Optional[EventType[()]] = None,
  769. on_mouse_over: Optional[EventType[()]] = None,
  770. on_mouse_up: Optional[EventType[()]] = None,
  771. on_scroll: Optional[EventType[()]] = None,
  772. on_unmount: Optional[EventType[()]] = None,
  773. **props,
  774. ) -> "Meter":
  775. """Create the component.
  776. Args:
  777. *children: The children of the component.
  778. form: Associates the meter with a form (by id)
  779. high: High limit of range (above this is considered high value)
  780. low: Low limit of range (below this is considered low value)
  781. max: Maximum value of the range
  782. min: Minimum value of the range
  783. optimum: Optimum value in the range
  784. value: Current value of the meter
  785. access_key: Provides a hint for generating a keyboard shortcut for the current element.
  786. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
  787. content_editable: Indicates whether the element's content is editable.
  788. context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
  789. dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
  790. draggable: Defines whether the element can be dragged.
  791. enter_key_hint: Hints what media types the media element is able to play.
  792. hidden: Defines whether the element is hidden.
  793. input_mode: Defines the type of the element.
  794. item_prop: Defines the name of the element for metadata purposes.
  795. lang: Defines the language used in the element.
  796. role: Defines the role of the element.
  797. slot: Assigns a slot in a shadow DOM shadow tree to an element.
  798. spell_check: Defines whether the element may be checked for spelling errors.
  799. tab_index: Defines the position of the current element in the tabbing order.
  800. title: Defines a tooltip for the element.
  801. style: The style of the component.
  802. key: A unique key for the component.
  803. id: The id for the component.
  804. class_name: The class name for the component.
  805. autofocus: Whether the component should take the focus once the page is loaded
  806. custom_attrs: custom attribute
  807. **props: The props of the component.
  808. Returns:
  809. The component.
  810. """
  811. ...
  812. class Optgroup(BaseHTML):
  813. @overload
  814. @classmethod
  815. def create( # type: ignore
  816. cls,
  817. *children,
  818. disabled: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  819. label: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  820. access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  821. auto_capitalize: Optional[
  822. Union[Var[Union[bool, int, str]], bool, int, str]
  823. ] = None,
  824. content_editable: Optional[
  825. Union[Var[Union[bool, int, str]], bool, int, str]
  826. ] = None,
  827. context_menu: Optional[
  828. Union[Var[Union[bool, int, str]], bool, int, str]
  829. ] = None,
  830. dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  831. draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  832. enter_key_hint: Optional[
  833. Union[Var[Union[bool, int, str]], bool, int, str]
  834. ] = None,
  835. hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  836. input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  837. item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  838. lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  839. role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  840. slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  841. spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  842. tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  843. title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  844. style: Optional[Style] = None,
  845. key: Optional[Any] = None,
  846. id: Optional[Any] = None,
  847. class_name: Optional[Any] = None,
  848. autofocus: Optional[bool] = None,
  849. custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
  850. on_blur: Optional[EventType[()]] = None,
  851. on_click: Optional[EventType[()]] = None,
  852. on_context_menu: Optional[EventType[()]] = None,
  853. on_double_click: Optional[EventType[()]] = None,
  854. on_focus: Optional[EventType[()]] = None,
  855. on_mount: Optional[EventType[()]] = None,
  856. on_mouse_down: Optional[EventType[()]] = None,
  857. on_mouse_enter: Optional[EventType[()]] = None,
  858. on_mouse_leave: Optional[EventType[()]] = None,
  859. on_mouse_move: Optional[EventType[()]] = None,
  860. on_mouse_out: Optional[EventType[()]] = None,
  861. on_mouse_over: Optional[EventType[()]] = None,
  862. on_mouse_up: Optional[EventType[()]] = None,
  863. on_scroll: Optional[EventType[()]] = None,
  864. on_unmount: Optional[EventType[()]] = None,
  865. **props,
  866. ) -> "Optgroup":
  867. """Create the component.
  868. Args:
  869. *children: The children of the component.
  870. disabled: Disables the optgroup
  871. label: Label for the optgroup
  872. access_key: Provides a hint for generating a keyboard shortcut for the current element.
  873. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
  874. content_editable: Indicates whether the element's content is editable.
  875. context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
  876. dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
  877. draggable: Defines whether the element can be dragged.
  878. enter_key_hint: Hints what media types the media element is able to play.
  879. hidden: Defines whether the element is hidden.
  880. input_mode: Defines the type of the element.
  881. item_prop: Defines the name of the element for metadata purposes.
  882. lang: Defines the language used in the element.
  883. role: Defines the role of the element.
  884. slot: Assigns a slot in a shadow DOM shadow tree to an element.
  885. spell_check: Defines whether the element may be checked for spelling errors.
  886. tab_index: Defines the position of the current element in the tabbing order.
  887. title: Defines a tooltip for the element.
  888. style: The style of the component.
  889. key: A unique key for the component.
  890. id: The id for the component.
  891. class_name: The class name for the component.
  892. autofocus: Whether the component should take the focus once the page is loaded
  893. custom_attrs: custom attribute
  894. **props: The props of the component.
  895. Returns:
  896. The component.
  897. """
  898. ...
  899. class Option(BaseHTML):
  900. @overload
  901. @classmethod
  902. def create( # type: ignore
  903. cls,
  904. *children,
  905. disabled: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  906. label: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  907. selected: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  908. value: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  909. access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  910. auto_capitalize: Optional[
  911. Union[Var[Union[bool, int, str]], bool, int, str]
  912. ] = None,
  913. content_editable: Optional[
  914. Union[Var[Union[bool, int, str]], bool, int, str]
  915. ] = None,
  916. context_menu: Optional[
  917. Union[Var[Union[bool, int, str]], bool, int, str]
  918. ] = None,
  919. dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  920. draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  921. enter_key_hint: Optional[
  922. Union[Var[Union[bool, int, str]], bool, int, str]
  923. ] = None,
  924. hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  925. input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  926. item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  927. lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  928. role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  929. slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  930. spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  931. tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  932. title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  933. style: Optional[Style] = None,
  934. key: Optional[Any] = None,
  935. id: Optional[Any] = None,
  936. class_name: Optional[Any] = None,
  937. autofocus: Optional[bool] = None,
  938. custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
  939. on_blur: Optional[EventType[()]] = None,
  940. on_click: Optional[EventType[()]] = None,
  941. on_context_menu: Optional[EventType[()]] = None,
  942. on_double_click: Optional[EventType[()]] = None,
  943. on_focus: Optional[EventType[()]] = None,
  944. on_mount: Optional[EventType[()]] = None,
  945. on_mouse_down: Optional[EventType[()]] = None,
  946. on_mouse_enter: Optional[EventType[()]] = None,
  947. on_mouse_leave: Optional[EventType[()]] = None,
  948. on_mouse_move: Optional[EventType[()]] = None,
  949. on_mouse_out: Optional[EventType[()]] = None,
  950. on_mouse_over: Optional[EventType[()]] = None,
  951. on_mouse_up: Optional[EventType[()]] = None,
  952. on_scroll: Optional[EventType[()]] = None,
  953. on_unmount: Optional[EventType[()]] = None,
  954. **props,
  955. ) -> "Option":
  956. """Create the component.
  957. Args:
  958. *children: The children of the component.
  959. disabled: Disables the option
  960. label: Label for the option, if the text is not the label
  961. selected: Indicates that the option is initially selected
  962. value: Value to be sent as form data
  963. access_key: Provides a hint for generating a keyboard shortcut for the current element.
  964. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
  965. content_editable: Indicates whether the element's content is editable.
  966. context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
  967. dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
  968. draggable: Defines whether the element can be dragged.
  969. enter_key_hint: Hints what media types the media element is able to play.
  970. hidden: Defines whether the element is hidden.
  971. input_mode: Defines the type of the element.
  972. item_prop: Defines the name of the element for metadata purposes.
  973. lang: Defines the language used in the element.
  974. role: Defines the role of the element.
  975. slot: Assigns a slot in a shadow DOM shadow tree to an element.
  976. spell_check: Defines whether the element may be checked for spelling errors.
  977. tab_index: Defines the position of the current element in the tabbing order.
  978. title: Defines a tooltip for the element.
  979. style: The style of the component.
  980. key: A unique key for the component.
  981. id: The id for the component.
  982. class_name: The class name for the component.
  983. autofocus: Whether the component should take the focus once the page is loaded
  984. custom_attrs: custom attribute
  985. **props: The props of the component.
  986. Returns:
  987. The component.
  988. """
  989. ...
  990. class Output(BaseHTML):
  991. @overload
  992. @classmethod
  993. def create( # type: ignore
  994. cls,
  995. *children,
  996. html_for: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  997. form: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  998. name: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  999. access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1000. auto_capitalize: Optional[
  1001. Union[Var[Union[bool, int, str]], bool, int, str]
  1002. ] = None,
  1003. content_editable: Optional[
  1004. Union[Var[Union[bool, int, str]], bool, int, str]
  1005. ] = None,
  1006. context_menu: Optional[
  1007. Union[Var[Union[bool, int, str]], bool, int, str]
  1008. ] = None,
  1009. dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1010. draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1011. enter_key_hint: Optional[
  1012. Union[Var[Union[bool, int, str]], bool, int, str]
  1013. ] = None,
  1014. hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1015. input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1016. item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1017. lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1018. role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1019. slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1020. spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1021. tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1022. title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1023. style: Optional[Style] = None,
  1024. key: Optional[Any] = None,
  1025. id: Optional[Any] = None,
  1026. class_name: Optional[Any] = None,
  1027. autofocus: Optional[bool] = None,
  1028. custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
  1029. on_blur: Optional[EventType[()]] = None,
  1030. on_click: Optional[EventType[()]] = None,
  1031. on_context_menu: Optional[EventType[()]] = None,
  1032. on_double_click: Optional[EventType[()]] = None,
  1033. on_focus: Optional[EventType[()]] = None,
  1034. on_mount: Optional[EventType[()]] = None,
  1035. on_mouse_down: Optional[EventType[()]] = None,
  1036. on_mouse_enter: Optional[EventType[()]] = None,
  1037. on_mouse_leave: Optional[EventType[()]] = None,
  1038. on_mouse_move: Optional[EventType[()]] = None,
  1039. on_mouse_out: Optional[EventType[()]] = None,
  1040. on_mouse_over: Optional[EventType[()]] = None,
  1041. on_mouse_up: Optional[EventType[()]] = None,
  1042. on_scroll: Optional[EventType[()]] = None,
  1043. on_unmount: Optional[EventType[()]] = None,
  1044. **props,
  1045. ) -> "Output":
  1046. """Create the component.
  1047. Args:
  1048. *children: The children of the component.
  1049. html_for: Associates the output with one or more elements (by their IDs)
  1050. form: Associates the output with a form (by id)
  1051. name: Name of the output element for form submission
  1052. access_key: Provides a hint for generating a keyboard shortcut for the current element.
  1053. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
  1054. content_editable: Indicates whether the element's content is editable.
  1055. context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
  1056. dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
  1057. draggable: Defines whether the element can be dragged.
  1058. enter_key_hint: Hints what media types the media element is able to play.
  1059. hidden: Defines whether the element is hidden.
  1060. input_mode: Defines the type of the element.
  1061. item_prop: Defines the name of the element for metadata purposes.
  1062. lang: Defines the language used in the element.
  1063. role: Defines the role of the element.
  1064. slot: Assigns a slot in a shadow DOM shadow tree to an element.
  1065. spell_check: Defines whether the element may be checked for spelling errors.
  1066. tab_index: Defines the position of the current element in the tabbing order.
  1067. title: Defines a tooltip for the element.
  1068. style: The style of the component.
  1069. key: A unique key for the component.
  1070. id: The id for the component.
  1071. class_name: The class name for the component.
  1072. autofocus: Whether the component should take the focus once the page is loaded
  1073. custom_attrs: custom attribute
  1074. **props: The props of the component.
  1075. Returns:
  1076. The component.
  1077. """
  1078. ...
  1079. class Progress(BaseHTML):
  1080. @overload
  1081. @classmethod
  1082. def create( # type: ignore
  1083. cls,
  1084. *children,
  1085. form: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1086. max: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1087. value: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1088. access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1089. auto_capitalize: Optional[
  1090. Union[Var[Union[bool, int, str]], bool, int, str]
  1091. ] = None,
  1092. content_editable: Optional[
  1093. Union[Var[Union[bool, int, str]], bool, int, str]
  1094. ] = None,
  1095. context_menu: Optional[
  1096. Union[Var[Union[bool, int, str]], bool, int, str]
  1097. ] = None,
  1098. dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1099. draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1100. enter_key_hint: Optional[
  1101. Union[Var[Union[bool, int, str]], bool, int, str]
  1102. ] = None,
  1103. hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1104. input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1105. item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1106. lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1107. role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1108. slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1109. spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1110. tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1111. title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1112. style: Optional[Style] = None,
  1113. key: Optional[Any] = None,
  1114. id: Optional[Any] = None,
  1115. class_name: Optional[Any] = None,
  1116. autofocus: Optional[bool] = None,
  1117. custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
  1118. on_blur: Optional[EventType[()]] = None,
  1119. on_click: Optional[EventType[()]] = None,
  1120. on_context_menu: Optional[EventType[()]] = None,
  1121. on_double_click: Optional[EventType[()]] = None,
  1122. on_focus: Optional[EventType[()]] = None,
  1123. on_mount: Optional[EventType[()]] = None,
  1124. on_mouse_down: Optional[EventType[()]] = None,
  1125. on_mouse_enter: Optional[EventType[()]] = None,
  1126. on_mouse_leave: Optional[EventType[()]] = None,
  1127. on_mouse_move: Optional[EventType[()]] = None,
  1128. on_mouse_out: Optional[EventType[()]] = None,
  1129. on_mouse_over: Optional[EventType[()]] = None,
  1130. on_mouse_up: Optional[EventType[()]] = None,
  1131. on_scroll: Optional[EventType[()]] = None,
  1132. on_unmount: Optional[EventType[()]] = None,
  1133. **props,
  1134. ) -> "Progress":
  1135. """Create the component.
  1136. Args:
  1137. *children: The children of the component.
  1138. form: Associates the progress element with a form (by id)
  1139. max: Maximum value of the progress indicator
  1140. value: Current value of the progress indicator
  1141. access_key: Provides a hint for generating a keyboard shortcut for the current element.
  1142. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
  1143. content_editable: Indicates whether the element's content is editable.
  1144. context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
  1145. dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
  1146. draggable: Defines whether the element can be dragged.
  1147. enter_key_hint: Hints what media types the media element is able to play.
  1148. hidden: Defines whether the element is hidden.
  1149. input_mode: Defines the type of the element.
  1150. item_prop: Defines the name of the element for metadata purposes.
  1151. lang: Defines the language used in the element.
  1152. role: Defines the role of the element.
  1153. slot: Assigns a slot in a shadow DOM shadow tree to an element.
  1154. spell_check: Defines whether the element may be checked for spelling errors.
  1155. tab_index: Defines the position of the current element in the tabbing order.
  1156. title: Defines a tooltip for the element.
  1157. style: The style of the component.
  1158. key: A unique key for the component.
  1159. id: The id for the component.
  1160. class_name: The class name for the component.
  1161. autofocus: Whether the component should take the focus once the page is loaded
  1162. custom_attrs: custom attribute
  1163. **props: The props of the component.
  1164. Returns:
  1165. The component.
  1166. """
  1167. ...
  1168. class Select(BaseHTML):
  1169. @overload
  1170. @classmethod
  1171. def create( # type: ignore
  1172. cls,
  1173. *children,
  1174. auto_complete: Optional[
  1175. Union[Var[Union[bool, int, str]], bool, int, str]
  1176. ] = None,
  1177. auto_focus: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1178. disabled: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1179. form: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1180. multiple: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1181. name: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1182. required: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1183. size: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1184. access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1185. auto_capitalize: Optional[
  1186. Union[Var[Union[bool, int, str]], bool, int, str]
  1187. ] = None,
  1188. content_editable: Optional[
  1189. Union[Var[Union[bool, int, str]], bool, int, str]
  1190. ] = None,
  1191. context_menu: Optional[
  1192. Union[Var[Union[bool, int, str]], bool, int, str]
  1193. ] = None,
  1194. dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1195. draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1196. enter_key_hint: Optional[
  1197. Union[Var[Union[bool, int, str]], bool, int, str]
  1198. ] = None,
  1199. hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1200. input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1201. item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1202. lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1203. role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1204. slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1205. spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1206. tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1207. title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1208. style: Optional[Style] = None,
  1209. key: Optional[Any] = None,
  1210. id: Optional[Any] = None,
  1211. class_name: Optional[Any] = None,
  1212. autofocus: Optional[bool] = None,
  1213. custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
  1214. on_blur: Optional[EventType[()]] = None,
  1215. on_change: Optional[Union[EventType[()], EventType[str]]] = None,
  1216. on_click: Optional[EventType[()]] = None,
  1217. on_context_menu: Optional[EventType[()]] = None,
  1218. on_double_click: Optional[EventType[()]] = None,
  1219. on_focus: Optional[EventType[()]] = None,
  1220. on_mount: Optional[EventType[()]] = None,
  1221. on_mouse_down: Optional[EventType[()]] = None,
  1222. on_mouse_enter: Optional[EventType[()]] = None,
  1223. on_mouse_leave: Optional[EventType[()]] = None,
  1224. on_mouse_move: Optional[EventType[()]] = None,
  1225. on_mouse_out: Optional[EventType[()]] = None,
  1226. on_mouse_over: Optional[EventType[()]] = None,
  1227. on_mouse_up: Optional[EventType[()]] = None,
  1228. on_scroll: Optional[EventType[()]] = None,
  1229. on_unmount: Optional[EventType[()]] = None,
  1230. **props,
  1231. ) -> "Select":
  1232. """Create the component.
  1233. Args:
  1234. *children: The children of the component.
  1235. auto_complete: Whether the form control should have autocomplete enabled
  1236. auto_focus: Automatically focuses the select when the page loads
  1237. disabled: Disables the select control
  1238. form: Associates the select with a form (by id)
  1239. multiple: Indicates that multiple options can be selected
  1240. name: Name of the select, used when submitting the form
  1241. required: Indicates that the select control must have a selected option
  1242. size: Number of visible options in a drop-down list
  1243. on_change: Fired when the select value changes
  1244. access_key: Provides a hint for generating a keyboard shortcut for the current element.
  1245. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
  1246. content_editable: Indicates whether the element's content is editable.
  1247. context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
  1248. dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
  1249. draggable: Defines whether the element can be dragged.
  1250. enter_key_hint: Hints what media types the media element is able to play.
  1251. hidden: Defines whether the element is hidden.
  1252. input_mode: Defines the type of the element.
  1253. item_prop: Defines the name of the element for metadata purposes.
  1254. lang: Defines the language used in the element.
  1255. role: Defines the role of the element.
  1256. slot: Assigns a slot in a shadow DOM shadow tree to an element.
  1257. spell_check: Defines whether the element may be checked for spelling errors.
  1258. tab_index: Defines the position of the current element in the tabbing order.
  1259. title: Defines a tooltip for the element.
  1260. style: The style of the component.
  1261. key: A unique key for the component.
  1262. id: The id for the component.
  1263. class_name: The class name for the component.
  1264. autofocus: Whether the component should take the focus once the page is loaded
  1265. custom_attrs: custom attribute
  1266. **props: The props of the component.
  1267. Returns:
  1268. The component.
  1269. """
  1270. ...
  1271. 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'
  1272. 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"
  1273. class Textarea(BaseHTML):
  1274. @overload
  1275. @classmethod
  1276. def create( # type: ignore
  1277. cls,
  1278. *children,
  1279. auto_complete: Optional[
  1280. Union[Var[Union[bool, int, str]], bool, int, str]
  1281. ] = None,
  1282. auto_focus: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1283. auto_height: Optional[Union[Var[bool], bool]] = None,
  1284. cols: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1285. default_value: Optional[Union[Var[str], str]] = None,
  1286. dirname: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1287. disabled: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1288. enter_key_submit: Optional[Union[Var[bool], bool]] = None,
  1289. form: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1290. max_length: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1291. min_length: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1292. name: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1293. placeholder: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1294. read_only: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1295. required: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1296. rows: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1297. value: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1298. wrap: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1299. access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1300. auto_capitalize: Optional[
  1301. Union[Var[Union[bool, int, str]], bool, int, str]
  1302. ] = None,
  1303. content_editable: Optional[
  1304. Union[Var[Union[bool, int, str]], bool, int, str]
  1305. ] = None,
  1306. context_menu: Optional[
  1307. Union[Var[Union[bool, int, str]], bool, int, str]
  1308. ] = None,
  1309. dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1310. draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1311. enter_key_hint: Optional[
  1312. Union[Var[Union[bool, int, str]], bool, int, str]
  1313. ] = None,
  1314. hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1315. input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1316. item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1317. lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1318. role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1319. slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1320. spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1321. tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1322. title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1323. style: Optional[Style] = None,
  1324. key: Optional[Any] = None,
  1325. id: Optional[Any] = None,
  1326. class_name: Optional[Any] = None,
  1327. autofocus: Optional[bool] = None,
  1328. custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
  1329. on_blur: Optional[Union[EventType[()], EventType[str]]] = None,
  1330. on_change: Optional[Union[EventType[()], EventType[str]]] = None,
  1331. on_click: Optional[EventType[()]] = None,
  1332. on_context_menu: Optional[EventType[()]] = None,
  1333. on_double_click: Optional[EventType[()]] = None,
  1334. on_focus: Optional[Union[EventType[()], EventType[str]]] = None,
  1335. on_key_down: Optional[
  1336. Union[EventType[()], EventType[str], EventType[str, KeyInputInfo]]
  1337. ] = None,
  1338. on_key_up: Optional[
  1339. Union[EventType[()], EventType[str], EventType[str, KeyInputInfo]]
  1340. ] = None,
  1341. on_mount: Optional[EventType[()]] = None,
  1342. on_mouse_down: Optional[EventType[()]] = None,
  1343. on_mouse_enter: Optional[EventType[()]] = None,
  1344. on_mouse_leave: Optional[EventType[()]] = None,
  1345. on_mouse_move: Optional[EventType[()]] = None,
  1346. on_mouse_out: Optional[EventType[()]] = None,
  1347. on_mouse_over: Optional[EventType[()]] = None,
  1348. on_mouse_up: Optional[EventType[()]] = None,
  1349. on_scroll: Optional[EventType[()]] = None,
  1350. on_unmount: Optional[EventType[()]] = None,
  1351. **props,
  1352. ) -> "Textarea":
  1353. """Create a textarea component.
  1354. Args:
  1355. *children: The children of the textarea.
  1356. auto_complete: Whether the form control should have autocomplete enabled
  1357. auto_focus: Automatically focuses the textarea when the page loads
  1358. auto_height: Automatically fit the content height to the text (use min-height with this prop)
  1359. cols: Visible width of the text control, in average character widths
  1360. default_value: The default value of the textarea when initially rendered
  1361. dirname: Name part of the textarea to submit in 'dir' and 'name' pair when form is submitted
  1362. disabled: Disables the textarea
  1363. enter_key_submit: Enter key submits form (shift-enter adds new line)
  1364. form: Associates the textarea with a form (by id)
  1365. max_length: Maximum number of characters allowed in the textarea
  1366. min_length: Minimum number of characters required in the textarea
  1367. name: Name of the textarea, used when submitting the form
  1368. placeholder: Placeholder text in the textarea
  1369. read_only: Indicates whether the textarea is read-only
  1370. required: Indicates that the textarea is required
  1371. rows: Visible number of lines in the text control
  1372. value: The controlled value of the textarea, read only unless used with on_change
  1373. wrap: How the text in the textarea is to be wrapped when submitting the form
  1374. on_change: Fired when the input value changes
  1375. on_focus: Fired when the input gains focus
  1376. on_blur: Fired when the input loses focus
  1377. on_key_down: Fired when a key is pressed down
  1378. on_key_up: Fired when a key is released
  1379. access_key: Provides a hint for generating a keyboard shortcut for the current element.
  1380. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
  1381. content_editable: Indicates whether the element's content is editable.
  1382. context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
  1383. dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
  1384. draggable: Defines whether the element can be dragged.
  1385. enter_key_hint: Hints what media types the media element is able to play.
  1386. hidden: Defines whether the element is hidden.
  1387. input_mode: Defines the type of the element.
  1388. item_prop: Defines the name of the element for metadata purposes.
  1389. lang: Defines the language used in the element.
  1390. role: Defines the role of the element.
  1391. slot: Assigns a slot in a shadow DOM shadow tree to an element.
  1392. spell_check: Defines whether the element may be checked for spelling errors.
  1393. tab_index: Defines the position of the current element in the tabbing order.
  1394. title: Defines a tooltip for the element.
  1395. style: The style of the component.
  1396. key: A unique key for the component.
  1397. id: The id for the component.
  1398. class_name: The class name for the component.
  1399. autofocus: Whether the component should take the focus once the page is loaded
  1400. custom_attrs: custom attribute
  1401. **props: The properties of the textarea.
  1402. Returns:
  1403. The textarea component.
  1404. Raises:
  1405. ValueError: when `enter_key_submit` is combined with `on_key_down`.
  1406. """
  1407. ...
  1408. button = Button.create
  1409. datalist = Datalist.create
  1410. fieldset = Fieldset.create
  1411. form = Form.create
  1412. input = Input.create
  1413. label = Label.create
  1414. legend = Legend.create
  1415. meter = Meter.create
  1416. optgroup = Optgroup.create
  1417. option = Option.create
  1418. output = Output.create
  1419. progress = Progress.create
  1420. select = Select.create
  1421. textarea = Textarea.create