text_field.pyi 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670
  1. """Stub file for reflex/components/radix/themes/components/text_field.py"""
  2. # ------------------- DO NOT EDIT ----------------------
  3. # This file was generated by `reflex/utils/pyi_generator.py`!
  4. # ------------------------------------------------------
  5. from typing import Any, Dict, Literal, Optional, Union, overload
  6. from reflex.components.component import ComponentNamespace
  7. from reflex.components.core.breakpoints import Breakpoints
  8. from reflex.components.el import elements
  9. from reflex.event import BASE_STATE, EventType, KeyInputInfo
  10. from reflex.style import Style
  11. from reflex.vars.base import Var
  12. from ..base import RadixThemesComponent
  13. LiteralTextFieldSize = Literal["1", "2", "3"]
  14. LiteralTextFieldVariant = Literal["classic", "surface", "soft"]
  15. class TextFieldRoot(elements.Input, RadixThemesComponent):
  16. @overload
  17. @classmethod
  18. def create( # type: ignore
  19. cls,
  20. *children,
  21. size: Optional[
  22. Union[
  23. Breakpoints[str, Literal["1", "2", "3"]],
  24. Literal["1", "2", "3"],
  25. Var[
  26. Union[
  27. Breakpoints[str, Literal["1", "2", "3"]], Literal["1", "2", "3"]
  28. ]
  29. ],
  30. ]
  31. ] = None,
  32. variant: Optional[
  33. Union[
  34. Literal["classic", "soft", "surface"],
  35. Var[Literal["classic", "soft", "surface"]],
  36. ]
  37. ] = None,
  38. color_scheme: Optional[
  39. Union[
  40. Literal[
  41. "amber",
  42. "blue",
  43. "bronze",
  44. "brown",
  45. "crimson",
  46. "cyan",
  47. "gold",
  48. "grass",
  49. "gray",
  50. "green",
  51. "indigo",
  52. "iris",
  53. "jade",
  54. "lime",
  55. "mint",
  56. "orange",
  57. "pink",
  58. "plum",
  59. "purple",
  60. "red",
  61. "ruby",
  62. "sky",
  63. "teal",
  64. "tomato",
  65. "violet",
  66. "yellow",
  67. ],
  68. Var[
  69. Literal[
  70. "amber",
  71. "blue",
  72. "bronze",
  73. "brown",
  74. "crimson",
  75. "cyan",
  76. "gold",
  77. "grass",
  78. "gray",
  79. "green",
  80. "indigo",
  81. "iris",
  82. "jade",
  83. "lime",
  84. "mint",
  85. "orange",
  86. "pink",
  87. "plum",
  88. "purple",
  89. "red",
  90. "ruby",
  91. "sky",
  92. "teal",
  93. "tomato",
  94. "violet",
  95. "yellow",
  96. ]
  97. ],
  98. ]
  99. ] = None,
  100. radius: Optional[
  101. Union[
  102. Literal["full", "large", "medium", "none", "small"],
  103. Var[Literal["full", "large", "medium", "none", "small"]],
  104. ]
  105. ] = None,
  106. auto_complete: Optional[Union[Var[bool], bool]] = None,
  107. default_value: Optional[Union[Var[str], str]] = None,
  108. disabled: Optional[Union[Var[bool], bool]] = None,
  109. max_length: Optional[Union[Var[int], int]] = None,
  110. min_length: Optional[Union[Var[int], int]] = None,
  111. name: Optional[Union[Var[str], str]] = None,
  112. placeholder: Optional[Union[Var[str], str]] = None,
  113. read_only: Optional[Union[Var[bool], bool]] = None,
  114. required: Optional[Union[Var[bool], bool]] = None,
  115. type: Optional[Union[Var[str], str]] = None,
  116. value: Optional[Union[Var[Union[float, int, str]], float, int, str]] = None,
  117. list: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  118. accept: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  119. alt: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  120. auto_focus: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  121. capture: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  122. checked: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  123. default_checked: Optional[Union[Var[bool], bool]] = None,
  124. dirname: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  125. form: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  126. form_action: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  127. form_enc_type: Optional[
  128. Union[Var[Union[bool, int, str]], bool, int, str]
  129. ] = None,
  130. form_method: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  131. form_no_validate: Optional[
  132. Union[Var[Union[bool, int, str]], bool, int, str]
  133. ] = None,
  134. form_target: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  135. max: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  136. min: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  137. multiple: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  138. pattern: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  139. src: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  140. step: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  141. use_map: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  142. access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  143. auto_capitalize: Optional[
  144. Union[Var[Union[bool, int, str]], bool, int, str]
  145. ] = None,
  146. content_editable: Optional[
  147. Union[Var[Union[bool, int, str]], bool, int, str]
  148. ] = None,
  149. context_menu: Optional[
  150. Union[Var[Union[bool, int, str]], bool, int, str]
  151. ] = None,
  152. dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  153. draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  154. enter_key_hint: Optional[
  155. Union[Var[Union[bool, int, str]], bool, int, str]
  156. ] = None,
  157. hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  158. input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  159. item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  160. lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  161. role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  162. slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  163. spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  164. tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  165. title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  166. style: Optional[Style] = None,
  167. key: Optional[Any] = None,
  168. id: Optional[Any] = None,
  169. class_name: Optional[Any] = None,
  170. autofocus: Optional[bool] = None,
  171. custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
  172. on_blur: Optional[
  173. Union[EventType[[], BASE_STATE], EventType[[str], BASE_STATE]]
  174. ] = None,
  175. on_change: Optional[
  176. Union[EventType[[], BASE_STATE], EventType[[str], BASE_STATE]]
  177. ] = None,
  178. on_click: Optional[EventType[[], BASE_STATE]] = None,
  179. on_context_menu: Optional[EventType[[], BASE_STATE]] = None,
  180. on_double_click: Optional[EventType[[], BASE_STATE]] = None,
  181. on_focus: Optional[
  182. Union[EventType[[], BASE_STATE], EventType[[str], BASE_STATE]]
  183. ] = None,
  184. on_key_down: Optional[
  185. Union[
  186. EventType[[], BASE_STATE],
  187. EventType[[str], BASE_STATE],
  188. EventType[[str, KeyInputInfo], BASE_STATE],
  189. ]
  190. ] = None,
  191. on_key_up: Optional[
  192. Union[
  193. EventType[[], BASE_STATE],
  194. EventType[[str], BASE_STATE],
  195. EventType[[str, KeyInputInfo], BASE_STATE],
  196. ]
  197. ] = None,
  198. on_mount: Optional[EventType[[], BASE_STATE]] = None,
  199. on_mouse_down: Optional[EventType[[], BASE_STATE]] = None,
  200. on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None,
  201. on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None,
  202. on_mouse_move: Optional[EventType[[], BASE_STATE]] = None,
  203. on_mouse_out: Optional[EventType[[], BASE_STATE]] = None,
  204. on_mouse_over: Optional[EventType[[], BASE_STATE]] = None,
  205. on_mouse_up: Optional[EventType[[], BASE_STATE]] = None,
  206. on_scroll: Optional[EventType[[], BASE_STATE]] = None,
  207. on_unmount: Optional[EventType[[], BASE_STATE]] = None,
  208. **props,
  209. ) -> "TextFieldRoot":
  210. """Create an Input component.
  211. Args:
  212. *children: The children of the component.
  213. size: Specifies the visible width of a text control
  214. variant: Variant of text field: "classic" | "surface" | "soft"
  215. color_scheme: Override theme color for text field
  216. radius: Override theme radius for text field: "none" | "small" | "medium" | "large" | "full"
  217. auto_complete: Whether the input should have autocomplete enabled
  218. default_value: The initial value for a text field
  219. disabled: Disables the input
  220. max_length: Specifies the maximum number of characters allowed in the input
  221. min_length: Specifies the minimum number of characters required in the input
  222. name: Name of the input, used when sending form data
  223. placeholder: Placeholder text in the input
  224. read_only: Indicates whether the input is read-only
  225. required: Indicates that the input is required
  226. type: Specifies the type of input
  227. value: Value of the input
  228. list: References a datalist for suggested options
  229. on_change: Fired when the input value changes
  230. on_focus: Fired when the input gains focus
  231. on_blur: Fired when the input loses focus
  232. on_key_down: Fired when a key is pressed down
  233. on_key_up: Fired when a key is released
  234. accept: Accepted types of files when the input is file type
  235. alt: Alternate text for input type="image"
  236. auto_focus: Automatically focuses the input when the page loads
  237. capture: Captures media from the user (camera or microphone)
  238. checked: Indicates whether the input is checked (for checkboxes and radio buttons)
  239. default_checked: The initial value (for checkboxes and radio buttons)
  240. dirname: Name part of the input to submit in 'dir' and 'name' pair when form is submitted
  241. form: Associates the input with a form (by id)
  242. form_action: URL to send the form data to (for type="submit" buttons)
  243. form_enc_type: How the form data should be encoded when submitting to the server (for type="submit" buttons)
  244. form_method: HTTP method to use for sending form data (for type="submit" buttons)
  245. form_no_validate: Bypasses form validation when submitting (for type="submit" buttons)
  246. form_target: Specifies where to display the response after submitting the form (for type="submit" buttons)
  247. max: Specifies the maximum value for the input
  248. min: Specifies the minimum value for the input
  249. multiple: Indicates whether multiple values can be entered in an input of the type email or file
  250. pattern: Regex pattern the input's value must match to be valid
  251. src: URL for image inputs
  252. step: Specifies the legal number intervals for an input
  253. use_map: Name of the image map used with the input
  254. access_key: Provides a hint for generating a keyboard shortcut for the current element.
  255. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
  256. content_editable: Indicates whether the element's content is editable.
  257. context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
  258. dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
  259. draggable: Defines whether the element can be dragged.
  260. enter_key_hint: Hints what media types the media element is able to play.
  261. hidden: Defines whether the element is hidden.
  262. input_mode: Defines the type of the element.
  263. item_prop: Defines the name of the element for metadata purposes.
  264. lang: Defines the language used in the element.
  265. role: Defines the role of the element.
  266. slot: Assigns a slot in a shadow DOM shadow tree to an element.
  267. spell_check: Defines whether the element may be checked for spelling errors.
  268. tab_index: Defines the position of the current element in the tabbing order.
  269. title: Defines a tooltip for the element.
  270. style: The style of the component.
  271. key: A unique key for the component.
  272. id: The id for the component.
  273. class_name: The class name for the component.
  274. autofocus: Whether the component should take the focus once the page is loaded
  275. custom_attrs: custom attribute
  276. **props: The properties of the component.
  277. Returns:
  278. The component.
  279. """
  280. ...
  281. class TextFieldSlot(RadixThemesComponent):
  282. @overload
  283. @classmethod
  284. def create( # type: ignore
  285. cls,
  286. *children,
  287. color_scheme: Optional[
  288. Union[
  289. Literal[
  290. "amber",
  291. "blue",
  292. "bronze",
  293. "brown",
  294. "crimson",
  295. "cyan",
  296. "gold",
  297. "grass",
  298. "gray",
  299. "green",
  300. "indigo",
  301. "iris",
  302. "jade",
  303. "lime",
  304. "mint",
  305. "orange",
  306. "pink",
  307. "plum",
  308. "purple",
  309. "red",
  310. "ruby",
  311. "sky",
  312. "teal",
  313. "tomato",
  314. "violet",
  315. "yellow",
  316. ],
  317. Var[
  318. Literal[
  319. "amber",
  320. "blue",
  321. "bronze",
  322. "brown",
  323. "crimson",
  324. "cyan",
  325. "gold",
  326. "grass",
  327. "gray",
  328. "green",
  329. "indigo",
  330. "iris",
  331. "jade",
  332. "lime",
  333. "mint",
  334. "orange",
  335. "pink",
  336. "plum",
  337. "purple",
  338. "red",
  339. "ruby",
  340. "sky",
  341. "teal",
  342. "tomato",
  343. "violet",
  344. "yellow",
  345. ]
  346. ],
  347. ]
  348. ] = None,
  349. style: Optional[Style] = None,
  350. key: Optional[Any] = None,
  351. id: Optional[Any] = None,
  352. class_name: Optional[Any] = None,
  353. autofocus: Optional[bool] = None,
  354. custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
  355. on_blur: Optional[EventType[[], BASE_STATE]] = None,
  356. on_click: Optional[EventType[[], BASE_STATE]] = None,
  357. on_context_menu: Optional[EventType[[], BASE_STATE]] = None,
  358. on_double_click: Optional[EventType[[], BASE_STATE]] = None,
  359. on_focus: Optional[EventType[[], BASE_STATE]] = None,
  360. on_mount: Optional[EventType[[], BASE_STATE]] = None,
  361. on_mouse_down: Optional[EventType[[], BASE_STATE]] = None,
  362. on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None,
  363. on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None,
  364. on_mouse_move: Optional[EventType[[], BASE_STATE]] = None,
  365. on_mouse_out: Optional[EventType[[], BASE_STATE]] = None,
  366. on_mouse_over: Optional[EventType[[], BASE_STATE]] = None,
  367. on_mouse_up: Optional[EventType[[], BASE_STATE]] = None,
  368. on_scroll: Optional[EventType[[], BASE_STATE]] = None,
  369. on_unmount: Optional[EventType[[], BASE_STATE]] = None,
  370. **props,
  371. ) -> "TextFieldSlot":
  372. """Create a new component instance.
  373. Will prepend "RadixThemes" to the component tag to avoid conflicts with
  374. other UI libraries for common names, like Text and Button.
  375. Args:
  376. *children: Child components.
  377. color_scheme: Override theme color for text field slot
  378. style: The style of the component.
  379. key: A unique key for the component.
  380. id: The id for the component.
  381. class_name: The class name for the component.
  382. autofocus: Whether the component should take the focus once the page is loaded
  383. custom_attrs: custom attribute
  384. **props: Component properties.
  385. Returns:
  386. A new component instance.
  387. """
  388. ...
  389. class TextField(ComponentNamespace):
  390. slot = staticmethod(TextFieldSlot.create)
  391. @staticmethod
  392. def __call__(
  393. *children,
  394. size: Optional[
  395. Union[
  396. Breakpoints[str, Literal["1", "2", "3"]],
  397. Literal["1", "2", "3"],
  398. Var[
  399. Union[
  400. Breakpoints[str, Literal["1", "2", "3"]], Literal["1", "2", "3"]
  401. ]
  402. ],
  403. ]
  404. ] = None,
  405. variant: Optional[
  406. Union[
  407. Literal["classic", "soft", "surface"],
  408. Var[Literal["classic", "soft", "surface"]],
  409. ]
  410. ] = None,
  411. color_scheme: Optional[
  412. Union[
  413. Literal[
  414. "amber",
  415. "blue",
  416. "bronze",
  417. "brown",
  418. "crimson",
  419. "cyan",
  420. "gold",
  421. "grass",
  422. "gray",
  423. "green",
  424. "indigo",
  425. "iris",
  426. "jade",
  427. "lime",
  428. "mint",
  429. "orange",
  430. "pink",
  431. "plum",
  432. "purple",
  433. "red",
  434. "ruby",
  435. "sky",
  436. "teal",
  437. "tomato",
  438. "violet",
  439. "yellow",
  440. ],
  441. Var[
  442. Literal[
  443. "amber",
  444. "blue",
  445. "bronze",
  446. "brown",
  447. "crimson",
  448. "cyan",
  449. "gold",
  450. "grass",
  451. "gray",
  452. "green",
  453. "indigo",
  454. "iris",
  455. "jade",
  456. "lime",
  457. "mint",
  458. "orange",
  459. "pink",
  460. "plum",
  461. "purple",
  462. "red",
  463. "ruby",
  464. "sky",
  465. "teal",
  466. "tomato",
  467. "violet",
  468. "yellow",
  469. ]
  470. ],
  471. ]
  472. ] = None,
  473. radius: Optional[
  474. Union[
  475. Literal["full", "large", "medium", "none", "small"],
  476. Var[Literal["full", "large", "medium", "none", "small"]],
  477. ]
  478. ] = None,
  479. auto_complete: Optional[Union[Var[bool], bool]] = None,
  480. default_value: Optional[Union[Var[str], str]] = None,
  481. disabled: Optional[Union[Var[bool], bool]] = None,
  482. max_length: Optional[Union[Var[int], int]] = None,
  483. min_length: Optional[Union[Var[int], int]] = None,
  484. name: Optional[Union[Var[str], str]] = None,
  485. placeholder: Optional[Union[Var[str], str]] = None,
  486. read_only: Optional[Union[Var[bool], bool]] = None,
  487. required: Optional[Union[Var[bool], bool]] = None,
  488. type: Optional[Union[Var[str], str]] = None,
  489. value: Optional[Union[Var[Union[float, int, str]], float, int, str]] = None,
  490. list: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  491. accept: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  492. alt: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  493. auto_focus: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  494. capture: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  495. checked: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  496. default_checked: Optional[Union[Var[bool], bool]] = None,
  497. dirname: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  498. form: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  499. form_action: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  500. form_enc_type: Optional[
  501. Union[Var[Union[bool, int, str]], bool, int, str]
  502. ] = None,
  503. form_method: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  504. form_no_validate: Optional[
  505. Union[Var[Union[bool, int, str]], bool, int, str]
  506. ] = None,
  507. form_target: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  508. max: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  509. min: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  510. multiple: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  511. pattern: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  512. src: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  513. step: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  514. use_map: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  515. access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  516. auto_capitalize: Optional[
  517. Union[Var[Union[bool, int, str]], bool, int, str]
  518. ] = None,
  519. content_editable: Optional[
  520. Union[Var[Union[bool, int, str]], bool, int, str]
  521. ] = None,
  522. context_menu: Optional[
  523. Union[Var[Union[bool, int, str]], bool, int, str]
  524. ] = None,
  525. dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  526. draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  527. enter_key_hint: Optional[
  528. Union[Var[Union[bool, int, str]], bool, int, str]
  529. ] = None,
  530. hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  531. input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  532. item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  533. lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  534. role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  535. slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  536. spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  537. tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  538. title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  539. style: Optional[Style] = None,
  540. key: Optional[Any] = None,
  541. id: Optional[Any] = None,
  542. class_name: Optional[Any] = None,
  543. autofocus: Optional[bool] = None,
  544. custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
  545. on_blur: Optional[
  546. Union[EventType[[], BASE_STATE], EventType[[str], BASE_STATE]]
  547. ] = None,
  548. on_change: Optional[
  549. Union[EventType[[], BASE_STATE], EventType[[str], BASE_STATE]]
  550. ] = None,
  551. on_click: Optional[EventType[[], BASE_STATE]] = None,
  552. on_context_menu: Optional[EventType[[], BASE_STATE]] = None,
  553. on_double_click: Optional[EventType[[], BASE_STATE]] = None,
  554. on_focus: Optional[
  555. Union[EventType[[], BASE_STATE], EventType[[str], BASE_STATE]]
  556. ] = None,
  557. on_key_down: Optional[
  558. Union[
  559. EventType[[], BASE_STATE],
  560. EventType[[str], BASE_STATE],
  561. EventType[[str, KeyInputInfo], BASE_STATE],
  562. ]
  563. ] = None,
  564. on_key_up: Optional[
  565. Union[
  566. EventType[[], BASE_STATE],
  567. EventType[[str], BASE_STATE],
  568. EventType[[str, KeyInputInfo], BASE_STATE],
  569. ]
  570. ] = None,
  571. on_mount: Optional[EventType[[], BASE_STATE]] = None,
  572. on_mouse_down: Optional[EventType[[], BASE_STATE]] = None,
  573. on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None,
  574. on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None,
  575. on_mouse_move: Optional[EventType[[], BASE_STATE]] = None,
  576. on_mouse_out: Optional[EventType[[], BASE_STATE]] = None,
  577. on_mouse_over: Optional[EventType[[], BASE_STATE]] = None,
  578. on_mouse_up: Optional[EventType[[], BASE_STATE]] = None,
  579. on_scroll: Optional[EventType[[], BASE_STATE]] = None,
  580. on_unmount: Optional[EventType[[], BASE_STATE]] = None,
  581. **props,
  582. ) -> "TextFieldRoot":
  583. """Create an Input component.
  584. Args:
  585. *children: The children of the component.
  586. size: Specifies the visible width of a text control
  587. variant: Variant of text field: "classic" | "surface" | "soft"
  588. color_scheme: Override theme color for text field
  589. radius: Override theme radius for text field: "none" | "small" | "medium" | "large" | "full"
  590. auto_complete: Whether the input should have autocomplete enabled
  591. default_value: The initial value for a text field
  592. disabled: Disables the input
  593. max_length: Specifies the maximum number of characters allowed in the input
  594. min_length: Specifies the minimum number of characters required in the input
  595. name: Name of the input, used when sending form data
  596. placeholder: Placeholder text in the input
  597. read_only: Indicates whether the input is read-only
  598. required: Indicates that the input is required
  599. type: Specifies the type of input
  600. value: Value of the input
  601. list: References a datalist for suggested options
  602. on_change: Fired when the input value changes
  603. on_focus: Fired when the input gains focus
  604. on_blur: Fired when the input loses focus
  605. on_key_down: Fired when a key is pressed down
  606. on_key_up: Fired when a key is released
  607. accept: Accepted types of files when the input is file type
  608. alt: Alternate text for input type="image"
  609. auto_focus: Automatically focuses the input when the page loads
  610. capture: Captures media from the user (camera or microphone)
  611. checked: Indicates whether the input is checked (for checkboxes and radio buttons)
  612. default_checked: The initial value (for checkboxes and radio buttons)
  613. dirname: Name part of the input to submit in 'dir' and 'name' pair when form is submitted
  614. form: Associates the input with a form (by id)
  615. form_action: URL to send the form data to (for type="submit" buttons)
  616. form_enc_type: How the form data should be encoded when submitting to the server (for type="submit" buttons)
  617. form_method: HTTP method to use for sending form data (for type="submit" buttons)
  618. form_no_validate: Bypasses form validation when submitting (for type="submit" buttons)
  619. form_target: Specifies where to display the response after submitting the form (for type="submit" buttons)
  620. max: Specifies the maximum value for the input
  621. min: Specifies the minimum value for the input
  622. multiple: Indicates whether multiple values can be entered in an input of the type email or file
  623. pattern: Regex pattern the input's value must match to be valid
  624. src: URL for image inputs
  625. step: Specifies the legal number intervals for an input
  626. use_map: Name of the image map used with the input
  627. access_key: Provides a hint for generating a keyboard shortcut for the current element.
  628. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
  629. content_editable: Indicates whether the element's content is editable.
  630. context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
  631. dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
  632. draggable: Defines whether the element can be dragged.
  633. enter_key_hint: Hints what media types the media element is able to play.
  634. hidden: Defines whether the element is hidden.
  635. input_mode: Defines the type of the element.
  636. item_prop: Defines the name of the element for metadata purposes.
  637. lang: Defines the language used in the element.
  638. role: Defines the role of the element.
  639. slot: Assigns a slot in a shadow DOM shadow tree to an element.
  640. spell_check: Defines whether the element may be checked for spelling errors.
  641. tab_index: Defines the position of the current element in the tabbing order.
  642. title: Defines a tooltip for the element.
  643. style: The style of the component.
  644. key: A unique key for the component.
  645. id: The id for the component.
  646. class_name: The class name for the component.
  647. autofocus: Whether the component should take the focus once the page is loaded
  648. custom_attrs: custom attribute
  649. **props: The properties of the component.
  650. Returns:
  651. The component.
  652. """
  653. ...
  654. input = text_field = TextField()