1
0

forms.pyi 122 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533
  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, Literal, Optional, 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 }}(ev));\n\n if ({{ reset_on_submit }}) {\n $form.reset()\n }\n })\n "
  16. )
  17. ButtonType = Literal["submit", "reset", "button"]
  18. class Button(BaseHTML):
  19. @overload
  20. @classmethod
  21. def create( # type: ignore
  22. cls,
  23. *children,
  24. auto_focus: Var[bool] | bool | None = None,
  25. disabled: Var[bool] | bool | None = None,
  26. form: Var[str] | str | None = None,
  27. form_action: Var[str] | str | None = None,
  28. form_enc_type: Var[str] | str | None = None,
  29. form_method: Var[str] | str | None = None,
  30. form_no_validate: Var[bool] | bool | None = None,
  31. form_target: Var[str] | str | None = None,
  32. name: Var[str] | str | None = None,
  33. type: Literal["button", "reset", "submit"]
  34. | Var[Literal["button", "reset", "submit"]]
  35. | None = None,
  36. value: Var[float | int | str] | float | int | str | None = None,
  37. access_key: Var[str] | str | None = None,
  38. auto_capitalize: Literal[
  39. "characters", "none", "off", "on", "sentences", "words"
  40. ]
  41. | Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
  42. | None = None,
  43. content_editable: Literal["inherit", "plaintext-only", False, True]
  44. | Var[Literal["inherit", "plaintext-only", False, True]]
  45. | None = None,
  46. context_menu: Var[str] | str | None = None,
  47. dir: Var[str] | str | None = None,
  48. draggable: Var[bool] | bool | None = None,
  49. enter_key_hint: Literal[
  50. "done", "enter", "go", "next", "previous", "search", "send"
  51. ]
  52. | Var[Literal["done", "enter", "go", "next", "previous", "search", "send"]]
  53. | None = None,
  54. hidden: Var[bool] | bool | None = None,
  55. input_mode: Literal[
  56. "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
  57. ]
  58. | Var[
  59. Literal[
  60. "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
  61. ]
  62. ]
  63. | None = None,
  64. item_prop: Var[str] | str | None = None,
  65. lang: Var[str] | str | None = None,
  66. role: Literal[
  67. "alert",
  68. "alertdialog",
  69. "application",
  70. "article",
  71. "banner",
  72. "button",
  73. "cell",
  74. "checkbox",
  75. "columnheader",
  76. "combobox",
  77. "complementary",
  78. "contentinfo",
  79. "definition",
  80. "dialog",
  81. "directory",
  82. "document",
  83. "feed",
  84. "figure",
  85. "form",
  86. "grid",
  87. "gridcell",
  88. "group",
  89. "heading",
  90. "img",
  91. "link",
  92. "list",
  93. "listbox",
  94. "listitem",
  95. "log",
  96. "main",
  97. "marquee",
  98. "math",
  99. "menu",
  100. "menubar",
  101. "menuitem",
  102. "menuitemcheckbox",
  103. "menuitemradio",
  104. "navigation",
  105. "none",
  106. "note",
  107. "option",
  108. "presentation",
  109. "progressbar",
  110. "radio",
  111. "radiogroup",
  112. "region",
  113. "row",
  114. "rowgroup",
  115. "rowheader",
  116. "scrollbar",
  117. "search",
  118. "searchbox",
  119. "separator",
  120. "slider",
  121. "spinbutton",
  122. "status",
  123. "switch",
  124. "tab",
  125. "table",
  126. "tablist",
  127. "tabpanel",
  128. "term",
  129. "textbox",
  130. "timer",
  131. "toolbar",
  132. "tooltip",
  133. "tree",
  134. "treegrid",
  135. "treeitem",
  136. ]
  137. | Var[
  138. Literal[
  139. "alert",
  140. "alertdialog",
  141. "application",
  142. "article",
  143. "banner",
  144. "button",
  145. "cell",
  146. "checkbox",
  147. "columnheader",
  148. "combobox",
  149. "complementary",
  150. "contentinfo",
  151. "definition",
  152. "dialog",
  153. "directory",
  154. "document",
  155. "feed",
  156. "figure",
  157. "form",
  158. "grid",
  159. "gridcell",
  160. "group",
  161. "heading",
  162. "img",
  163. "link",
  164. "list",
  165. "listbox",
  166. "listitem",
  167. "log",
  168. "main",
  169. "marquee",
  170. "math",
  171. "menu",
  172. "menubar",
  173. "menuitem",
  174. "menuitemcheckbox",
  175. "menuitemradio",
  176. "navigation",
  177. "none",
  178. "note",
  179. "option",
  180. "presentation",
  181. "progressbar",
  182. "radio",
  183. "radiogroup",
  184. "region",
  185. "row",
  186. "rowgroup",
  187. "rowheader",
  188. "scrollbar",
  189. "search",
  190. "searchbox",
  191. "separator",
  192. "slider",
  193. "spinbutton",
  194. "status",
  195. "switch",
  196. "tab",
  197. "table",
  198. "tablist",
  199. "tabpanel",
  200. "term",
  201. "textbox",
  202. "timer",
  203. "toolbar",
  204. "tooltip",
  205. "tree",
  206. "treegrid",
  207. "treeitem",
  208. ]
  209. ]
  210. | None = None,
  211. slot: Var[str] | str | None = None,
  212. spell_check: Var[bool] | bool | None = None,
  213. tab_index: Var[int] | int | None = None,
  214. title: Var[str] | str | None = None,
  215. style: Style | None = None,
  216. key: Any | None = None,
  217. id: Any | None = None,
  218. class_name: Any | None = None,
  219. autofocus: bool | None = None,
  220. custom_attrs: dict[str, Var | Any] | None = None,
  221. on_blur: Optional[EventType[()]] = None,
  222. on_click: Optional[EventType[()]] = None,
  223. on_context_menu: Optional[EventType[()]] = None,
  224. on_double_click: Optional[EventType[()]] = None,
  225. on_focus: Optional[EventType[()]] = None,
  226. on_mount: Optional[EventType[()]] = None,
  227. on_mouse_down: Optional[EventType[()]] = None,
  228. on_mouse_enter: Optional[EventType[()]] = None,
  229. on_mouse_leave: Optional[EventType[()]] = None,
  230. on_mouse_move: Optional[EventType[()]] = None,
  231. on_mouse_out: Optional[EventType[()]] = None,
  232. on_mouse_over: Optional[EventType[()]] = None,
  233. on_mouse_up: Optional[EventType[()]] = None,
  234. on_scroll: Optional[EventType[()]] = None,
  235. on_unmount: Optional[EventType[()]] = None,
  236. **props,
  237. ) -> "Button":
  238. """Create the component.
  239. Args:
  240. *children: The children of the component.
  241. auto_focus: Automatically focuses the button when the page loads
  242. disabled: Disables the button
  243. form: Associates the button with a form (by id)
  244. form_action: URL to send the form data to (for type="submit" buttons)
  245. form_enc_type: How the form data should be encoded when submitting to the server (for type="submit" buttons)
  246. form_method: HTTP method to use for sending form data (for type="submit" buttons)
  247. form_no_validate: Bypasses form validation when submitting (for type="submit" buttons)
  248. form_target: Specifies where to display the response after submitting the form (for type="submit" buttons)
  249. name: Name of the button, used when sending form data
  250. type: Type of the button (submit, reset, or button)
  251. value: Value of the button, used when sending form data
  252. access_key: Provides a hint for generating a keyboard shortcut for the current element.
  253. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
  254. content_editable: Indicates whether the element's content is editable.
  255. context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
  256. dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
  257. draggable: Defines whether the element can be dragged.
  258. enter_key_hint: Hints what media types the media element is able to play.
  259. hidden: Defines whether the element is hidden.
  260. input_mode: Defines the type of the element.
  261. item_prop: Defines the name of the element for metadata purposes.
  262. lang: Defines the language used in the element.
  263. role: Defines the role of the element.
  264. slot: Assigns a slot in a shadow DOM shadow tree to an element.
  265. spell_check: Defines whether the element may be checked for spelling errors.
  266. tab_index: Defines the position of the current element in the tabbing order.
  267. title: Defines a tooltip for the element.
  268. style: The style of the component.
  269. key: A unique key for the component.
  270. id: The id for the component.
  271. class_name: The class name for the component.
  272. autofocus: Whether the component should take the focus once the page is loaded
  273. custom_attrs: custom attribute
  274. **props: The props of the component.
  275. Returns:
  276. The component.
  277. """
  278. ...
  279. class Datalist(BaseHTML):
  280. @overload
  281. @classmethod
  282. def create( # type: ignore
  283. cls,
  284. *children,
  285. access_key: Var[str] | str | None = None,
  286. auto_capitalize: Literal[
  287. "characters", "none", "off", "on", "sentences", "words"
  288. ]
  289. | Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
  290. | None = None,
  291. content_editable: Literal["inherit", "plaintext-only", False, True]
  292. | Var[Literal["inherit", "plaintext-only", False, True]]
  293. | None = None,
  294. context_menu: Var[str] | str | None = None,
  295. dir: Var[str] | str | None = None,
  296. draggable: Var[bool] | bool | None = None,
  297. enter_key_hint: Literal[
  298. "done", "enter", "go", "next", "previous", "search", "send"
  299. ]
  300. | Var[Literal["done", "enter", "go", "next", "previous", "search", "send"]]
  301. | None = None,
  302. hidden: Var[bool] | bool | None = None,
  303. input_mode: Literal[
  304. "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
  305. ]
  306. | Var[
  307. Literal[
  308. "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
  309. ]
  310. ]
  311. | None = None,
  312. item_prop: Var[str] | str | None = None,
  313. lang: Var[str] | str | None = None,
  314. role: Literal[
  315. "alert",
  316. "alertdialog",
  317. "application",
  318. "article",
  319. "banner",
  320. "button",
  321. "cell",
  322. "checkbox",
  323. "columnheader",
  324. "combobox",
  325. "complementary",
  326. "contentinfo",
  327. "definition",
  328. "dialog",
  329. "directory",
  330. "document",
  331. "feed",
  332. "figure",
  333. "form",
  334. "grid",
  335. "gridcell",
  336. "group",
  337. "heading",
  338. "img",
  339. "link",
  340. "list",
  341. "listbox",
  342. "listitem",
  343. "log",
  344. "main",
  345. "marquee",
  346. "math",
  347. "menu",
  348. "menubar",
  349. "menuitem",
  350. "menuitemcheckbox",
  351. "menuitemradio",
  352. "navigation",
  353. "none",
  354. "note",
  355. "option",
  356. "presentation",
  357. "progressbar",
  358. "radio",
  359. "radiogroup",
  360. "region",
  361. "row",
  362. "rowgroup",
  363. "rowheader",
  364. "scrollbar",
  365. "search",
  366. "searchbox",
  367. "separator",
  368. "slider",
  369. "spinbutton",
  370. "status",
  371. "switch",
  372. "tab",
  373. "table",
  374. "tablist",
  375. "tabpanel",
  376. "term",
  377. "textbox",
  378. "timer",
  379. "toolbar",
  380. "tooltip",
  381. "tree",
  382. "treegrid",
  383. "treeitem",
  384. ]
  385. | Var[
  386. Literal[
  387. "alert",
  388. "alertdialog",
  389. "application",
  390. "article",
  391. "banner",
  392. "button",
  393. "cell",
  394. "checkbox",
  395. "columnheader",
  396. "combobox",
  397. "complementary",
  398. "contentinfo",
  399. "definition",
  400. "dialog",
  401. "directory",
  402. "document",
  403. "feed",
  404. "figure",
  405. "form",
  406. "grid",
  407. "gridcell",
  408. "group",
  409. "heading",
  410. "img",
  411. "link",
  412. "list",
  413. "listbox",
  414. "listitem",
  415. "log",
  416. "main",
  417. "marquee",
  418. "math",
  419. "menu",
  420. "menubar",
  421. "menuitem",
  422. "menuitemcheckbox",
  423. "menuitemradio",
  424. "navigation",
  425. "none",
  426. "note",
  427. "option",
  428. "presentation",
  429. "progressbar",
  430. "radio",
  431. "radiogroup",
  432. "region",
  433. "row",
  434. "rowgroup",
  435. "rowheader",
  436. "scrollbar",
  437. "search",
  438. "searchbox",
  439. "separator",
  440. "slider",
  441. "spinbutton",
  442. "status",
  443. "switch",
  444. "tab",
  445. "table",
  446. "tablist",
  447. "tabpanel",
  448. "term",
  449. "textbox",
  450. "timer",
  451. "toolbar",
  452. "tooltip",
  453. "tree",
  454. "treegrid",
  455. "treeitem",
  456. ]
  457. ]
  458. | None = None,
  459. slot: Var[str] | str | None = None,
  460. spell_check: Var[bool] | bool | None = None,
  461. tab_index: Var[int] | int | None = None,
  462. title: Var[str] | str | None = None,
  463. style: Style | None = None,
  464. key: Any | None = None,
  465. id: Any | None = None,
  466. class_name: Any | None = None,
  467. autofocus: bool | None = None,
  468. custom_attrs: dict[str, Var | Any] | None = None,
  469. on_blur: Optional[EventType[()]] = None,
  470. on_click: Optional[EventType[()]] = None,
  471. on_context_menu: Optional[EventType[()]] = None,
  472. on_double_click: Optional[EventType[()]] = None,
  473. on_focus: Optional[EventType[()]] = None,
  474. on_mount: Optional[EventType[()]] = None,
  475. on_mouse_down: Optional[EventType[()]] = None,
  476. on_mouse_enter: Optional[EventType[()]] = None,
  477. on_mouse_leave: Optional[EventType[()]] = None,
  478. on_mouse_move: Optional[EventType[()]] = None,
  479. on_mouse_out: Optional[EventType[()]] = None,
  480. on_mouse_over: Optional[EventType[()]] = None,
  481. on_mouse_up: Optional[EventType[()]] = None,
  482. on_scroll: Optional[EventType[()]] = None,
  483. on_unmount: Optional[EventType[()]] = None,
  484. **props,
  485. ) -> "Datalist":
  486. """Create the component.
  487. Args:
  488. *children: The children of the component.
  489. access_key: Provides a hint for generating a keyboard shortcut for the current element.
  490. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
  491. content_editable: Indicates whether the element's content is editable.
  492. context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
  493. dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
  494. draggable: Defines whether the element can be dragged.
  495. enter_key_hint: Hints what media types the media element is able to play.
  496. hidden: Defines whether the element is hidden.
  497. input_mode: Defines the type of the element.
  498. item_prop: Defines the name of the element for metadata purposes.
  499. lang: Defines the language used in the element.
  500. role: Defines the role of the element.
  501. slot: Assigns a slot in a shadow DOM shadow tree to an element.
  502. spell_check: Defines whether the element may be checked for spelling errors.
  503. tab_index: Defines the position of the current element in the tabbing order.
  504. title: Defines a tooltip for the element.
  505. style: The style of the component.
  506. key: A unique key for the component.
  507. id: The id for the component.
  508. class_name: The class name for the component.
  509. autofocus: Whether the component should take the focus once the page is loaded
  510. custom_attrs: custom attribute
  511. **props: The props of the component.
  512. Returns:
  513. The component.
  514. """
  515. ...
  516. class Fieldset(Element):
  517. @overload
  518. @classmethod
  519. def create( # type: ignore
  520. cls,
  521. *children,
  522. disabled: Var[bool] | bool | None = None,
  523. form: Var[str] | str | None = None,
  524. name: Var[str] | str | None = None,
  525. style: Style | None = None,
  526. key: Any | None = None,
  527. id: Any | None = None,
  528. class_name: Any | None = None,
  529. autofocus: bool | None = None,
  530. custom_attrs: dict[str, Var | Any] | None = None,
  531. on_blur: Optional[EventType[()]] = None,
  532. on_click: Optional[EventType[()]] = None,
  533. on_context_menu: Optional[EventType[()]] = None,
  534. on_double_click: Optional[EventType[()]] = None,
  535. on_focus: Optional[EventType[()]] = None,
  536. on_mount: Optional[EventType[()]] = None,
  537. on_mouse_down: Optional[EventType[()]] = None,
  538. on_mouse_enter: Optional[EventType[()]] = None,
  539. on_mouse_leave: Optional[EventType[()]] = None,
  540. on_mouse_move: Optional[EventType[()]] = None,
  541. on_mouse_out: Optional[EventType[()]] = None,
  542. on_mouse_over: Optional[EventType[()]] = None,
  543. on_mouse_up: Optional[EventType[()]] = None,
  544. on_scroll: Optional[EventType[()]] = None,
  545. on_unmount: Optional[EventType[()]] = None,
  546. **props,
  547. ) -> "Fieldset":
  548. """Create the component.
  549. Args:
  550. *children: The children of the component.
  551. disabled: Disables all the form control descendants of the fieldset
  552. form: Associates the fieldset with a form (by id)
  553. name: Name of the fieldset, used for scripting
  554. style: The style of the component.
  555. key: A unique key for the component.
  556. id: The id for the component.
  557. class_name: The class name for the component.
  558. autofocus: Whether the component should take the focus once the page is loaded
  559. custom_attrs: custom attribute
  560. **props: The props of the component.
  561. Returns:
  562. The component.
  563. """
  564. ...
  565. def on_submit_event_spec() -> tuple[Var[dict[str, Any]]]: ...
  566. def on_submit_string_event_spec() -> tuple[Var[dict[str, str]]]: ...
  567. class Form(BaseHTML):
  568. @overload
  569. @classmethod
  570. def create( # type: ignore
  571. cls,
  572. *children,
  573. accept: Var[str] | str | None = None,
  574. accept_charset: Var[str] | str | None = None,
  575. action: Var[str] | str | None = None,
  576. auto_complete: Var[str] | str | None = None,
  577. enc_type: Var[str] | str | None = None,
  578. method: Var[str] | str | None = None,
  579. name: Var[str] | str | None = None,
  580. no_validate: Var[bool] | bool | None = None,
  581. target: Var[str] | str | None = None,
  582. reset_on_submit: Var[bool] | bool | None = None,
  583. handle_submit_unique_name: Var[str] | str | None = None,
  584. access_key: Var[str] | str | None = None,
  585. auto_capitalize: Literal[
  586. "characters", "none", "off", "on", "sentences", "words"
  587. ]
  588. | Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
  589. | None = None,
  590. content_editable: Literal["inherit", "plaintext-only", False, True]
  591. | Var[Literal["inherit", "plaintext-only", False, True]]
  592. | None = None,
  593. context_menu: Var[str] | str | None = None,
  594. dir: Var[str] | str | None = None,
  595. draggable: Var[bool] | bool | None = None,
  596. enter_key_hint: Literal[
  597. "done", "enter", "go", "next", "previous", "search", "send"
  598. ]
  599. | Var[Literal["done", "enter", "go", "next", "previous", "search", "send"]]
  600. | None = None,
  601. hidden: Var[bool] | bool | None = None,
  602. input_mode: Literal[
  603. "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
  604. ]
  605. | Var[
  606. Literal[
  607. "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
  608. ]
  609. ]
  610. | None = None,
  611. item_prop: Var[str] | str | None = None,
  612. lang: Var[str] | str | None = None,
  613. role: Literal[
  614. "alert",
  615. "alertdialog",
  616. "application",
  617. "article",
  618. "banner",
  619. "button",
  620. "cell",
  621. "checkbox",
  622. "columnheader",
  623. "combobox",
  624. "complementary",
  625. "contentinfo",
  626. "definition",
  627. "dialog",
  628. "directory",
  629. "document",
  630. "feed",
  631. "figure",
  632. "form",
  633. "grid",
  634. "gridcell",
  635. "group",
  636. "heading",
  637. "img",
  638. "link",
  639. "list",
  640. "listbox",
  641. "listitem",
  642. "log",
  643. "main",
  644. "marquee",
  645. "math",
  646. "menu",
  647. "menubar",
  648. "menuitem",
  649. "menuitemcheckbox",
  650. "menuitemradio",
  651. "navigation",
  652. "none",
  653. "note",
  654. "option",
  655. "presentation",
  656. "progressbar",
  657. "radio",
  658. "radiogroup",
  659. "region",
  660. "row",
  661. "rowgroup",
  662. "rowheader",
  663. "scrollbar",
  664. "search",
  665. "searchbox",
  666. "separator",
  667. "slider",
  668. "spinbutton",
  669. "status",
  670. "switch",
  671. "tab",
  672. "table",
  673. "tablist",
  674. "tabpanel",
  675. "term",
  676. "textbox",
  677. "timer",
  678. "toolbar",
  679. "tooltip",
  680. "tree",
  681. "treegrid",
  682. "treeitem",
  683. ]
  684. | Var[
  685. Literal[
  686. "alert",
  687. "alertdialog",
  688. "application",
  689. "article",
  690. "banner",
  691. "button",
  692. "cell",
  693. "checkbox",
  694. "columnheader",
  695. "combobox",
  696. "complementary",
  697. "contentinfo",
  698. "definition",
  699. "dialog",
  700. "directory",
  701. "document",
  702. "feed",
  703. "figure",
  704. "form",
  705. "grid",
  706. "gridcell",
  707. "group",
  708. "heading",
  709. "img",
  710. "link",
  711. "list",
  712. "listbox",
  713. "listitem",
  714. "log",
  715. "main",
  716. "marquee",
  717. "math",
  718. "menu",
  719. "menubar",
  720. "menuitem",
  721. "menuitemcheckbox",
  722. "menuitemradio",
  723. "navigation",
  724. "none",
  725. "note",
  726. "option",
  727. "presentation",
  728. "progressbar",
  729. "radio",
  730. "radiogroup",
  731. "region",
  732. "row",
  733. "rowgroup",
  734. "rowheader",
  735. "scrollbar",
  736. "search",
  737. "searchbox",
  738. "separator",
  739. "slider",
  740. "spinbutton",
  741. "status",
  742. "switch",
  743. "tab",
  744. "table",
  745. "tablist",
  746. "tabpanel",
  747. "term",
  748. "textbox",
  749. "timer",
  750. "toolbar",
  751. "tooltip",
  752. "tree",
  753. "treegrid",
  754. "treeitem",
  755. ]
  756. ]
  757. | None = None,
  758. slot: Var[str] | str | None = None,
  759. spell_check: Var[bool] | bool | None = None,
  760. tab_index: Var[int] | int | None = None,
  761. title: Var[str] | str | None = None,
  762. style: Style | None = None,
  763. key: Any | None = None,
  764. id: Any | None = None,
  765. class_name: Any | None = None,
  766. autofocus: bool | None = None,
  767. custom_attrs: dict[str, Var | Any] | None = None,
  768. on_blur: Optional[EventType[()]] = None,
  769. on_click: Optional[EventType[()]] = None,
  770. on_context_menu: Optional[EventType[()]] = None,
  771. on_double_click: Optional[EventType[()]] = None,
  772. on_focus: Optional[EventType[()]] = None,
  773. on_mount: Optional[EventType[()]] = None,
  774. on_mouse_down: Optional[EventType[()]] = None,
  775. on_mouse_enter: Optional[EventType[()]] = None,
  776. on_mouse_leave: Optional[EventType[()]] = None,
  777. on_mouse_move: Optional[EventType[()]] = None,
  778. on_mouse_out: Optional[EventType[()]] = None,
  779. on_mouse_over: Optional[EventType[()]] = None,
  780. on_mouse_up: Optional[EventType[()]] = None,
  781. on_scroll: Optional[EventType[()]] = None,
  782. on_submit: Optional[
  783. Union[
  784. EventType[()] | EventType[dict[str, Any]],
  785. EventType[()] | EventType[dict[str, str]],
  786. ]
  787. ] = None,
  788. on_unmount: Optional[EventType[()]] = None,
  789. **props,
  790. ) -> "Form":
  791. """Create a form component.
  792. Args:
  793. *children: The children of the form.
  794. accept: MIME types the server accepts for file upload
  795. accept_charset: Character encodings to be used for form submission
  796. action: URL where the form's data should be submitted
  797. auto_complete: Whether the form should have autocomplete enabled
  798. enc_type: Encoding type for the form data when submitted
  799. method: HTTP method to use for form submission
  800. name: Name of the form
  801. no_validate: Indicates that the form should not be validated on submit
  802. target: Where to display the response after submitting the form
  803. reset_on_submit: If true, the form will be cleared after submit.
  804. handle_submit_unique_name: The name used to make this form's submit handler function unique.
  805. on_submit: Fired when the form is submitted
  806. access_key: Provides a hint for generating a keyboard shortcut for the current element.
  807. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
  808. content_editable: Indicates whether the element's content is editable.
  809. context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
  810. dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
  811. draggable: Defines whether the element can be dragged.
  812. enter_key_hint: Hints what media types the media element is able to play.
  813. hidden: Defines whether the element is hidden.
  814. input_mode: Defines the type of the element.
  815. item_prop: Defines the name of the element for metadata purposes.
  816. lang: Defines the language used in the element.
  817. role: Defines the role of the element.
  818. slot: Assigns a slot in a shadow DOM shadow tree to an element.
  819. spell_check: Defines whether the element may be checked for spelling errors.
  820. tab_index: Defines the position of the current element in the tabbing order.
  821. title: Defines a tooltip for the element.
  822. style: The style of the component.
  823. key: A unique key for the component.
  824. id: The id for the component.
  825. class_name: The class name for the component.
  826. autofocus: Whether the component should take the focus once the page is loaded
  827. custom_attrs: custom attribute
  828. **props: The properties of the form.
  829. Returns:
  830. The form component.
  831. """
  832. ...
  833. def add_imports(self) -> ImportDict: ...
  834. def add_hooks(self) -> list[str]: ...
  835. HTMLInputTypeAttribute = Literal[
  836. "button",
  837. "checkbox",
  838. "color",
  839. "date",
  840. "datetime-local",
  841. "email",
  842. "file",
  843. "hidden",
  844. "image",
  845. "month",
  846. "number",
  847. "password",
  848. "radio",
  849. "range",
  850. "reset",
  851. "search",
  852. "submit",
  853. "tel",
  854. "text",
  855. "time",
  856. "url",
  857. "week",
  858. ]
  859. class Input(BaseHTML):
  860. @overload
  861. @classmethod
  862. def create( # type: ignore
  863. cls,
  864. *children,
  865. accept: Var[str] | str | None = None,
  866. alt: Var[str] | str | None = None,
  867. auto_complete: Var[str] | str | None = None,
  868. auto_focus: Var[bool] | bool | None = None,
  869. capture: Literal["environment", "user", False, True]
  870. | Var[Literal["environment", "user", False, True]]
  871. | None = None,
  872. checked: Var[bool] | bool | None = None,
  873. default_checked: Var[bool] | bool | None = None,
  874. default_value: Var[float | int | str] | float | int | str | None = None,
  875. disabled: Var[bool] | bool | None = None,
  876. form: Var[str] | str | None = None,
  877. form_action: Var[str] | str | None = None,
  878. form_enc_type: Var[str] | str | None = None,
  879. form_method: Var[str] | str | None = None,
  880. form_no_validate: Var[bool] | bool | None = None,
  881. form_target: Var[str] | str | None = None,
  882. list: Var[str] | str | None = None,
  883. max: Var[float | int | str] | float | int | str | None = None,
  884. max_length: Var[float | int] | float | int | None = None,
  885. min_length: Var[float | int] | float | int | None = None,
  886. min: Var[float | int | str] | float | int | str | None = None,
  887. multiple: Var[bool] | bool | None = None,
  888. name: Var[str] | str | None = None,
  889. pattern: Var[str] | str | None = None,
  890. placeholder: Var[str] | str | None = None,
  891. read_only: Var[bool] | bool | None = None,
  892. required: Var[bool] | bool | None = None,
  893. size: Var[float | int] | float | int | None = None,
  894. src: Var[str] | str | None = None,
  895. step: Var[float | int | str] | float | int | str | None = None,
  896. type: Literal[
  897. "button",
  898. "checkbox",
  899. "color",
  900. "date",
  901. "datetime-local",
  902. "email",
  903. "file",
  904. "hidden",
  905. "image",
  906. "month",
  907. "number",
  908. "password",
  909. "radio",
  910. "range",
  911. "reset",
  912. "search",
  913. "submit",
  914. "tel",
  915. "text",
  916. "time",
  917. "url",
  918. "week",
  919. ]
  920. | Var[
  921. Literal[
  922. "button",
  923. "checkbox",
  924. "color",
  925. "date",
  926. "datetime-local",
  927. "email",
  928. "file",
  929. "hidden",
  930. "image",
  931. "month",
  932. "number",
  933. "password",
  934. "radio",
  935. "range",
  936. "reset",
  937. "search",
  938. "submit",
  939. "tel",
  940. "text",
  941. "time",
  942. "url",
  943. "week",
  944. ]
  945. ]
  946. | None = None,
  947. value: Var[float | int | str] | float | int | str | None = None,
  948. access_key: Var[str] | str | None = None,
  949. auto_capitalize: Literal[
  950. "characters", "none", "off", "on", "sentences", "words"
  951. ]
  952. | Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
  953. | None = None,
  954. content_editable: Literal["inherit", "plaintext-only", False, True]
  955. | Var[Literal["inherit", "plaintext-only", False, True]]
  956. | None = None,
  957. context_menu: Var[str] | str | None = None,
  958. dir: Var[str] | str | None = None,
  959. draggable: Var[bool] | bool | None = None,
  960. enter_key_hint: Literal[
  961. "done", "enter", "go", "next", "previous", "search", "send"
  962. ]
  963. | Var[Literal["done", "enter", "go", "next", "previous", "search", "send"]]
  964. | None = None,
  965. hidden: Var[bool] | bool | None = None,
  966. input_mode: Literal[
  967. "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
  968. ]
  969. | Var[
  970. Literal[
  971. "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
  972. ]
  973. ]
  974. | None = None,
  975. item_prop: Var[str] | str | None = None,
  976. lang: Var[str] | str | None = None,
  977. role: Literal[
  978. "alert",
  979. "alertdialog",
  980. "application",
  981. "article",
  982. "banner",
  983. "button",
  984. "cell",
  985. "checkbox",
  986. "columnheader",
  987. "combobox",
  988. "complementary",
  989. "contentinfo",
  990. "definition",
  991. "dialog",
  992. "directory",
  993. "document",
  994. "feed",
  995. "figure",
  996. "form",
  997. "grid",
  998. "gridcell",
  999. "group",
  1000. "heading",
  1001. "img",
  1002. "link",
  1003. "list",
  1004. "listbox",
  1005. "listitem",
  1006. "log",
  1007. "main",
  1008. "marquee",
  1009. "math",
  1010. "menu",
  1011. "menubar",
  1012. "menuitem",
  1013. "menuitemcheckbox",
  1014. "menuitemradio",
  1015. "navigation",
  1016. "none",
  1017. "note",
  1018. "option",
  1019. "presentation",
  1020. "progressbar",
  1021. "radio",
  1022. "radiogroup",
  1023. "region",
  1024. "row",
  1025. "rowgroup",
  1026. "rowheader",
  1027. "scrollbar",
  1028. "search",
  1029. "searchbox",
  1030. "separator",
  1031. "slider",
  1032. "spinbutton",
  1033. "status",
  1034. "switch",
  1035. "tab",
  1036. "table",
  1037. "tablist",
  1038. "tabpanel",
  1039. "term",
  1040. "textbox",
  1041. "timer",
  1042. "toolbar",
  1043. "tooltip",
  1044. "tree",
  1045. "treegrid",
  1046. "treeitem",
  1047. ]
  1048. | Var[
  1049. Literal[
  1050. "alert",
  1051. "alertdialog",
  1052. "application",
  1053. "article",
  1054. "banner",
  1055. "button",
  1056. "cell",
  1057. "checkbox",
  1058. "columnheader",
  1059. "combobox",
  1060. "complementary",
  1061. "contentinfo",
  1062. "definition",
  1063. "dialog",
  1064. "directory",
  1065. "document",
  1066. "feed",
  1067. "figure",
  1068. "form",
  1069. "grid",
  1070. "gridcell",
  1071. "group",
  1072. "heading",
  1073. "img",
  1074. "link",
  1075. "list",
  1076. "listbox",
  1077. "listitem",
  1078. "log",
  1079. "main",
  1080. "marquee",
  1081. "math",
  1082. "menu",
  1083. "menubar",
  1084. "menuitem",
  1085. "menuitemcheckbox",
  1086. "menuitemradio",
  1087. "navigation",
  1088. "none",
  1089. "note",
  1090. "option",
  1091. "presentation",
  1092. "progressbar",
  1093. "radio",
  1094. "radiogroup",
  1095. "region",
  1096. "row",
  1097. "rowgroup",
  1098. "rowheader",
  1099. "scrollbar",
  1100. "search",
  1101. "searchbox",
  1102. "separator",
  1103. "slider",
  1104. "spinbutton",
  1105. "status",
  1106. "switch",
  1107. "tab",
  1108. "table",
  1109. "tablist",
  1110. "tabpanel",
  1111. "term",
  1112. "textbox",
  1113. "timer",
  1114. "toolbar",
  1115. "tooltip",
  1116. "tree",
  1117. "treegrid",
  1118. "treeitem",
  1119. ]
  1120. ]
  1121. | None = None,
  1122. slot: Var[str] | str | None = None,
  1123. spell_check: Var[bool] | bool | None = None,
  1124. tab_index: Var[int] | int | None = None,
  1125. title: Var[str] | str | None = None,
  1126. style: Style | None = None,
  1127. key: Any | None = None,
  1128. id: Any | None = None,
  1129. class_name: Any | None = None,
  1130. autofocus: bool | None = None,
  1131. custom_attrs: dict[str, Var | Any] | None = None,
  1132. on_blur: Optional[EventType[()] | EventType[str]] = None,
  1133. on_change: Optional[EventType[()] | EventType[str]] = None,
  1134. on_click: Optional[EventType[()]] = None,
  1135. on_context_menu: Optional[EventType[()]] = None,
  1136. on_double_click: Optional[EventType[()]] = None,
  1137. on_focus: Optional[EventType[()] | EventType[str]] = None,
  1138. on_key_down: Optional[
  1139. EventType[()] | EventType[str] | EventType[str, KeyInputInfo]
  1140. ] = None,
  1141. on_key_up: Optional[
  1142. EventType[()] | EventType[str] | EventType[str, KeyInputInfo]
  1143. ] = None,
  1144. on_mount: Optional[EventType[()]] = None,
  1145. on_mouse_down: Optional[EventType[()]] = None,
  1146. on_mouse_enter: Optional[EventType[()]] = None,
  1147. on_mouse_leave: Optional[EventType[()]] = None,
  1148. on_mouse_move: Optional[EventType[()]] = None,
  1149. on_mouse_out: Optional[EventType[()]] = None,
  1150. on_mouse_over: Optional[EventType[()]] = None,
  1151. on_mouse_up: Optional[EventType[()]] = None,
  1152. on_scroll: Optional[EventType[()]] = None,
  1153. on_unmount: Optional[EventType[()]] = None,
  1154. **props,
  1155. ) -> "Input":
  1156. """Create an Input component.
  1157. Args:
  1158. *children: The children of the component.
  1159. accept: Accepted types of files when the input is file type
  1160. alt: Alternate text for input type="image"
  1161. auto_complete: Whether the input should have autocomplete enabled
  1162. auto_focus: Automatically focuses the input when the page loads
  1163. capture: Captures media from the user (camera or microphone)
  1164. checked: Indicates whether the input is checked (for checkboxes and radio buttons)
  1165. default_checked: The initial value (for checkboxes and radio buttons)
  1166. default_value: The initial value for a text field
  1167. disabled: Disables the input
  1168. form: Associates the input with a form (by id)
  1169. form_action: URL to send the form data to (for type="submit" buttons)
  1170. form_enc_type: How the form data should be encoded when submitting to the server (for type="submit" buttons)
  1171. form_method: HTTP method to use for sending form data (for type="submit" buttons)
  1172. form_no_validate: Bypasses form validation when submitting (for type="submit" buttons)
  1173. form_target: Specifies where to display the response after submitting the form (for type="submit" buttons)
  1174. list: References a datalist for suggested options
  1175. max: Specifies the maximum value for the input
  1176. max_length: Specifies the maximum number of characters allowed in the input
  1177. min_length: Specifies the minimum number of characters required in the input
  1178. min: Specifies the minimum value for the input
  1179. multiple: Indicates whether multiple values can be entered in an input of the type email or file
  1180. name: Name of the input, used when sending form data
  1181. pattern: Regex pattern the input's value must match to be valid
  1182. placeholder: Placeholder text in the input
  1183. read_only: Indicates whether the input is read-only
  1184. required: Indicates that the input is required
  1185. size: Specifies the visible width of a text control
  1186. src: URL for image inputs
  1187. step: Specifies the legal number intervals for an input
  1188. type: Specifies the type of input
  1189. value: Value of the input
  1190. on_change: Fired when the input value changes
  1191. on_focus: Fired when the input gains focus
  1192. on_blur: Fired when the input loses focus
  1193. on_key_down: Fired when a key is pressed down
  1194. on_key_up: Fired when a key is released
  1195. access_key: Provides a hint for generating a keyboard shortcut for the current element.
  1196. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
  1197. content_editable: Indicates whether the element's content is editable.
  1198. context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
  1199. dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
  1200. draggable: Defines whether the element can be dragged.
  1201. enter_key_hint: Hints what media types the media element is able to play.
  1202. hidden: Defines whether the element is hidden.
  1203. input_mode: Defines the type of the element.
  1204. item_prop: Defines the name of the element for metadata purposes.
  1205. lang: Defines the language used in the element.
  1206. role: Defines the role of the element.
  1207. slot: Assigns a slot in a shadow DOM shadow tree to an element.
  1208. spell_check: Defines whether the element may be checked for spelling errors.
  1209. tab_index: Defines the position of the current element in the tabbing order.
  1210. title: Defines a tooltip for the element.
  1211. style: The style of the component.
  1212. key: A unique key for the component.
  1213. id: The id for the component.
  1214. class_name: The class name for the component.
  1215. autofocus: Whether the component should take the focus once the page is loaded
  1216. custom_attrs: custom attribute
  1217. **props: The properties of the component.
  1218. Returns:
  1219. The component.
  1220. """
  1221. ...
  1222. class Label(BaseHTML):
  1223. @overload
  1224. @classmethod
  1225. def create( # type: ignore
  1226. cls,
  1227. *children,
  1228. html_for: Var[str] | str | None = None,
  1229. form: Var[str] | str | None = None,
  1230. access_key: Var[str] | str | None = None,
  1231. auto_capitalize: Literal[
  1232. "characters", "none", "off", "on", "sentences", "words"
  1233. ]
  1234. | Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
  1235. | None = None,
  1236. content_editable: Literal["inherit", "plaintext-only", False, True]
  1237. | Var[Literal["inherit", "plaintext-only", False, True]]
  1238. | None = None,
  1239. context_menu: Var[str] | str | None = None,
  1240. dir: Var[str] | str | None = None,
  1241. draggable: Var[bool] | bool | None = None,
  1242. enter_key_hint: Literal[
  1243. "done", "enter", "go", "next", "previous", "search", "send"
  1244. ]
  1245. | Var[Literal["done", "enter", "go", "next", "previous", "search", "send"]]
  1246. | None = None,
  1247. hidden: Var[bool] | bool | None = None,
  1248. input_mode: Literal[
  1249. "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
  1250. ]
  1251. | Var[
  1252. Literal[
  1253. "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
  1254. ]
  1255. ]
  1256. | None = None,
  1257. item_prop: Var[str] | str | None = None,
  1258. lang: Var[str] | str | None = None,
  1259. role: Literal[
  1260. "alert",
  1261. "alertdialog",
  1262. "application",
  1263. "article",
  1264. "banner",
  1265. "button",
  1266. "cell",
  1267. "checkbox",
  1268. "columnheader",
  1269. "combobox",
  1270. "complementary",
  1271. "contentinfo",
  1272. "definition",
  1273. "dialog",
  1274. "directory",
  1275. "document",
  1276. "feed",
  1277. "figure",
  1278. "form",
  1279. "grid",
  1280. "gridcell",
  1281. "group",
  1282. "heading",
  1283. "img",
  1284. "link",
  1285. "list",
  1286. "listbox",
  1287. "listitem",
  1288. "log",
  1289. "main",
  1290. "marquee",
  1291. "math",
  1292. "menu",
  1293. "menubar",
  1294. "menuitem",
  1295. "menuitemcheckbox",
  1296. "menuitemradio",
  1297. "navigation",
  1298. "none",
  1299. "note",
  1300. "option",
  1301. "presentation",
  1302. "progressbar",
  1303. "radio",
  1304. "radiogroup",
  1305. "region",
  1306. "row",
  1307. "rowgroup",
  1308. "rowheader",
  1309. "scrollbar",
  1310. "search",
  1311. "searchbox",
  1312. "separator",
  1313. "slider",
  1314. "spinbutton",
  1315. "status",
  1316. "switch",
  1317. "tab",
  1318. "table",
  1319. "tablist",
  1320. "tabpanel",
  1321. "term",
  1322. "textbox",
  1323. "timer",
  1324. "toolbar",
  1325. "tooltip",
  1326. "tree",
  1327. "treegrid",
  1328. "treeitem",
  1329. ]
  1330. | Var[
  1331. Literal[
  1332. "alert",
  1333. "alertdialog",
  1334. "application",
  1335. "article",
  1336. "banner",
  1337. "button",
  1338. "cell",
  1339. "checkbox",
  1340. "columnheader",
  1341. "combobox",
  1342. "complementary",
  1343. "contentinfo",
  1344. "definition",
  1345. "dialog",
  1346. "directory",
  1347. "document",
  1348. "feed",
  1349. "figure",
  1350. "form",
  1351. "grid",
  1352. "gridcell",
  1353. "group",
  1354. "heading",
  1355. "img",
  1356. "link",
  1357. "list",
  1358. "listbox",
  1359. "listitem",
  1360. "log",
  1361. "main",
  1362. "marquee",
  1363. "math",
  1364. "menu",
  1365. "menubar",
  1366. "menuitem",
  1367. "menuitemcheckbox",
  1368. "menuitemradio",
  1369. "navigation",
  1370. "none",
  1371. "note",
  1372. "option",
  1373. "presentation",
  1374. "progressbar",
  1375. "radio",
  1376. "radiogroup",
  1377. "region",
  1378. "row",
  1379. "rowgroup",
  1380. "rowheader",
  1381. "scrollbar",
  1382. "search",
  1383. "searchbox",
  1384. "separator",
  1385. "slider",
  1386. "spinbutton",
  1387. "status",
  1388. "switch",
  1389. "tab",
  1390. "table",
  1391. "tablist",
  1392. "tabpanel",
  1393. "term",
  1394. "textbox",
  1395. "timer",
  1396. "toolbar",
  1397. "tooltip",
  1398. "tree",
  1399. "treegrid",
  1400. "treeitem",
  1401. ]
  1402. ]
  1403. | None = None,
  1404. slot: Var[str] | str | None = None,
  1405. spell_check: Var[bool] | bool | None = None,
  1406. tab_index: Var[int] | int | None = None,
  1407. title: Var[str] | str | None = None,
  1408. style: Style | None = None,
  1409. key: Any | None = None,
  1410. id: Any | None = None,
  1411. class_name: Any | None = None,
  1412. autofocus: bool | None = None,
  1413. custom_attrs: dict[str, Var | Any] | None = None,
  1414. on_blur: Optional[EventType[()]] = None,
  1415. on_click: Optional[EventType[()]] = None,
  1416. on_context_menu: Optional[EventType[()]] = None,
  1417. on_double_click: Optional[EventType[()]] = None,
  1418. on_focus: Optional[EventType[()]] = None,
  1419. on_mount: Optional[EventType[()]] = None,
  1420. on_mouse_down: Optional[EventType[()]] = None,
  1421. on_mouse_enter: Optional[EventType[()]] = None,
  1422. on_mouse_leave: Optional[EventType[()]] = None,
  1423. on_mouse_move: Optional[EventType[()]] = None,
  1424. on_mouse_out: Optional[EventType[()]] = None,
  1425. on_mouse_over: Optional[EventType[()]] = None,
  1426. on_mouse_up: Optional[EventType[()]] = None,
  1427. on_scroll: Optional[EventType[()]] = None,
  1428. on_unmount: Optional[EventType[()]] = None,
  1429. **props,
  1430. ) -> "Label":
  1431. """Create the component.
  1432. Args:
  1433. *children: The children of the component.
  1434. html_for: ID of a form control with which the label is associated
  1435. form: Associates the label with a form (by id)
  1436. access_key: Provides a hint for generating a keyboard shortcut for the current element.
  1437. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
  1438. content_editable: Indicates whether the element's content is editable.
  1439. context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
  1440. dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
  1441. draggable: Defines whether the element can be dragged.
  1442. enter_key_hint: Hints what media types the media element is able to play.
  1443. hidden: Defines whether the element is hidden.
  1444. input_mode: Defines the type of the element.
  1445. item_prop: Defines the name of the element for metadata purposes.
  1446. lang: Defines the language used in the element.
  1447. role: Defines the role of the element.
  1448. slot: Assigns a slot in a shadow DOM shadow tree to an element.
  1449. spell_check: Defines whether the element may be checked for spelling errors.
  1450. tab_index: Defines the position of the current element in the tabbing order.
  1451. title: Defines a tooltip for the element.
  1452. style: The style of the component.
  1453. key: A unique key for the component.
  1454. id: The id for the component.
  1455. class_name: The class name for the component.
  1456. autofocus: Whether the component should take the focus once the page is loaded
  1457. custom_attrs: custom attribute
  1458. **props: The props of the component.
  1459. Returns:
  1460. The component.
  1461. """
  1462. ...
  1463. class Legend(BaseHTML):
  1464. @overload
  1465. @classmethod
  1466. def create( # type: ignore
  1467. cls,
  1468. *children,
  1469. access_key: Var[str] | str | None = None,
  1470. auto_capitalize: Literal[
  1471. "characters", "none", "off", "on", "sentences", "words"
  1472. ]
  1473. | Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
  1474. | None = None,
  1475. content_editable: Literal["inherit", "plaintext-only", False, True]
  1476. | Var[Literal["inherit", "plaintext-only", False, True]]
  1477. | None = None,
  1478. context_menu: Var[str] | str | None = None,
  1479. dir: Var[str] | str | None = None,
  1480. draggable: Var[bool] | bool | None = None,
  1481. enter_key_hint: Literal[
  1482. "done", "enter", "go", "next", "previous", "search", "send"
  1483. ]
  1484. | Var[Literal["done", "enter", "go", "next", "previous", "search", "send"]]
  1485. | None = None,
  1486. hidden: Var[bool] | bool | None = None,
  1487. input_mode: Literal[
  1488. "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
  1489. ]
  1490. | Var[
  1491. Literal[
  1492. "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
  1493. ]
  1494. ]
  1495. | None = None,
  1496. item_prop: Var[str] | str | None = None,
  1497. lang: Var[str] | str | None = None,
  1498. role: Literal[
  1499. "alert",
  1500. "alertdialog",
  1501. "application",
  1502. "article",
  1503. "banner",
  1504. "button",
  1505. "cell",
  1506. "checkbox",
  1507. "columnheader",
  1508. "combobox",
  1509. "complementary",
  1510. "contentinfo",
  1511. "definition",
  1512. "dialog",
  1513. "directory",
  1514. "document",
  1515. "feed",
  1516. "figure",
  1517. "form",
  1518. "grid",
  1519. "gridcell",
  1520. "group",
  1521. "heading",
  1522. "img",
  1523. "link",
  1524. "list",
  1525. "listbox",
  1526. "listitem",
  1527. "log",
  1528. "main",
  1529. "marquee",
  1530. "math",
  1531. "menu",
  1532. "menubar",
  1533. "menuitem",
  1534. "menuitemcheckbox",
  1535. "menuitemradio",
  1536. "navigation",
  1537. "none",
  1538. "note",
  1539. "option",
  1540. "presentation",
  1541. "progressbar",
  1542. "radio",
  1543. "radiogroup",
  1544. "region",
  1545. "row",
  1546. "rowgroup",
  1547. "rowheader",
  1548. "scrollbar",
  1549. "search",
  1550. "searchbox",
  1551. "separator",
  1552. "slider",
  1553. "spinbutton",
  1554. "status",
  1555. "switch",
  1556. "tab",
  1557. "table",
  1558. "tablist",
  1559. "tabpanel",
  1560. "term",
  1561. "textbox",
  1562. "timer",
  1563. "toolbar",
  1564. "tooltip",
  1565. "tree",
  1566. "treegrid",
  1567. "treeitem",
  1568. ]
  1569. | Var[
  1570. Literal[
  1571. "alert",
  1572. "alertdialog",
  1573. "application",
  1574. "article",
  1575. "banner",
  1576. "button",
  1577. "cell",
  1578. "checkbox",
  1579. "columnheader",
  1580. "combobox",
  1581. "complementary",
  1582. "contentinfo",
  1583. "definition",
  1584. "dialog",
  1585. "directory",
  1586. "document",
  1587. "feed",
  1588. "figure",
  1589. "form",
  1590. "grid",
  1591. "gridcell",
  1592. "group",
  1593. "heading",
  1594. "img",
  1595. "link",
  1596. "list",
  1597. "listbox",
  1598. "listitem",
  1599. "log",
  1600. "main",
  1601. "marquee",
  1602. "math",
  1603. "menu",
  1604. "menubar",
  1605. "menuitem",
  1606. "menuitemcheckbox",
  1607. "menuitemradio",
  1608. "navigation",
  1609. "none",
  1610. "note",
  1611. "option",
  1612. "presentation",
  1613. "progressbar",
  1614. "radio",
  1615. "radiogroup",
  1616. "region",
  1617. "row",
  1618. "rowgroup",
  1619. "rowheader",
  1620. "scrollbar",
  1621. "search",
  1622. "searchbox",
  1623. "separator",
  1624. "slider",
  1625. "spinbutton",
  1626. "status",
  1627. "switch",
  1628. "tab",
  1629. "table",
  1630. "tablist",
  1631. "tabpanel",
  1632. "term",
  1633. "textbox",
  1634. "timer",
  1635. "toolbar",
  1636. "tooltip",
  1637. "tree",
  1638. "treegrid",
  1639. "treeitem",
  1640. ]
  1641. ]
  1642. | None = None,
  1643. slot: Var[str] | str | None = None,
  1644. spell_check: Var[bool] | bool | None = None,
  1645. tab_index: Var[int] | int | None = None,
  1646. title: Var[str] | str | None = None,
  1647. style: Style | None = None,
  1648. key: Any | None = None,
  1649. id: Any | None = None,
  1650. class_name: Any | None = None,
  1651. autofocus: bool | None = None,
  1652. custom_attrs: dict[str, Var | Any] | None = None,
  1653. on_blur: Optional[EventType[()]] = None,
  1654. on_click: Optional[EventType[()]] = None,
  1655. on_context_menu: Optional[EventType[()]] = None,
  1656. on_double_click: Optional[EventType[()]] = None,
  1657. on_focus: Optional[EventType[()]] = None,
  1658. on_mount: Optional[EventType[()]] = None,
  1659. on_mouse_down: Optional[EventType[()]] = None,
  1660. on_mouse_enter: Optional[EventType[()]] = None,
  1661. on_mouse_leave: Optional[EventType[()]] = None,
  1662. on_mouse_move: Optional[EventType[()]] = None,
  1663. on_mouse_out: Optional[EventType[()]] = None,
  1664. on_mouse_over: Optional[EventType[()]] = None,
  1665. on_mouse_up: Optional[EventType[()]] = None,
  1666. on_scroll: Optional[EventType[()]] = None,
  1667. on_unmount: Optional[EventType[()]] = None,
  1668. **props,
  1669. ) -> "Legend":
  1670. """Create the component.
  1671. Args:
  1672. *children: The children of the component.
  1673. access_key: Provides a hint for generating a keyboard shortcut for the current element.
  1674. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
  1675. content_editable: Indicates whether the element's content is editable.
  1676. context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
  1677. dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
  1678. draggable: Defines whether the element can be dragged.
  1679. enter_key_hint: Hints what media types the media element is able to play.
  1680. hidden: Defines whether the element is hidden.
  1681. input_mode: Defines the type of the element.
  1682. item_prop: Defines the name of the element for metadata purposes.
  1683. lang: Defines the language used in the element.
  1684. role: Defines the role of the element.
  1685. slot: Assigns a slot in a shadow DOM shadow tree to an element.
  1686. spell_check: Defines whether the element may be checked for spelling errors.
  1687. tab_index: Defines the position of the current element in the tabbing order.
  1688. title: Defines a tooltip for the element.
  1689. style: The style of the component.
  1690. key: A unique key for the component.
  1691. id: The id for the component.
  1692. class_name: The class name for the component.
  1693. autofocus: Whether the component should take the focus once the page is loaded
  1694. custom_attrs: custom attribute
  1695. **props: The props of the component.
  1696. Returns:
  1697. The component.
  1698. """
  1699. ...
  1700. class Meter(BaseHTML):
  1701. @overload
  1702. @classmethod
  1703. def create( # type: ignore
  1704. cls,
  1705. *children,
  1706. form: Var[str] | str | None = None,
  1707. high: Var[float | int] | float | int | None = None,
  1708. low: Var[float | int] | float | int | None = None,
  1709. max: Var[float | int] | float | int | None = None,
  1710. min: Var[float | int] | float | int | None = None,
  1711. optimum: Var[float | int] | float | int | None = None,
  1712. value: Var[float | int] | float | int | None = None,
  1713. access_key: Var[str] | str | None = None,
  1714. auto_capitalize: Literal[
  1715. "characters", "none", "off", "on", "sentences", "words"
  1716. ]
  1717. | Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
  1718. | None = None,
  1719. content_editable: Literal["inherit", "plaintext-only", False, True]
  1720. | Var[Literal["inherit", "plaintext-only", False, True]]
  1721. | None = None,
  1722. context_menu: Var[str] | str | None = None,
  1723. dir: Var[str] | str | None = None,
  1724. draggable: Var[bool] | bool | None = None,
  1725. enter_key_hint: Literal[
  1726. "done", "enter", "go", "next", "previous", "search", "send"
  1727. ]
  1728. | Var[Literal["done", "enter", "go", "next", "previous", "search", "send"]]
  1729. | None = None,
  1730. hidden: Var[bool] | bool | None = None,
  1731. input_mode: Literal[
  1732. "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
  1733. ]
  1734. | Var[
  1735. Literal[
  1736. "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
  1737. ]
  1738. ]
  1739. | None = None,
  1740. item_prop: Var[str] | str | None = None,
  1741. lang: Var[str] | str | None = None,
  1742. role: Literal[
  1743. "alert",
  1744. "alertdialog",
  1745. "application",
  1746. "article",
  1747. "banner",
  1748. "button",
  1749. "cell",
  1750. "checkbox",
  1751. "columnheader",
  1752. "combobox",
  1753. "complementary",
  1754. "contentinfo",
  1755. "definition",
  1756. "dialog",
  1757. "directory",
  1758. "document",
  1759. "feed",
  1760. "figure",
  1761. "form",
  1762. "grid",
  1763. "gridcell",
  1764. "group",
  1765. "heading",
  1766. "img",
  1767. "link",
  1768. "list",
  1769. "listbox",
  1770. "listitem",
  1771. "log",
  1772. "main",
  1773. "marquee",
  1774. "math",
  1775. "menu",
  1776. "menubar",
  1777. "menuitem",
  1778. "menuitemcheckbox",
  1779. "menuitemradio",
  1780. "navigation",
  1781. "none",
  1782. "note",
  1783. "option",
  1784. "presentation",
  1785. "progressbar",
  1786. "radio",
  1787. "radiogroup",
  1788. "region",
  1789. "row",
  1790. "rowgroup",
  1791. "rowheader",
  1792. "scrollbar",
  1793. "search",
  1794. "searchbox",
  1795. "separator",
  1796. "slider",
  1797. "spinbutton",
  1798. "status",
  1799. "switch",
  1800. "tab",
  1801. "table",
  1802. "tablist",
  1803. "tabpanel",
  1804. "term",
  1805. "textbox",
  1806. "timer",
  1807. "toolbar",
  1808. "tooltip",
  1809. "tree",
  1810. "treegrid",
  1811. "treeitem",
  1812. ]
  1813. | Var[
  1814. Literal[
  1815. "alert",
  1816. "alertdialog",
  1817. "application",
  1818. "article",
  1819. "banner",
  1820. "button",
  1821. "cell",
  1822. "checkbox",
  1823. "columnheader",
  1824. "combobox",
  1825. "complementary",
  1826. "contentinfo",
  1827. "definition",
  1828. "dialog",
  1829. "directory",
  1830. "document",
  1831. "feed",
  1832. "figure",
  1833. "form",
  1834. "grid",
  1835. "gridcell",
  1836. "group",
  1837. "heading",
  1838. "img",
  1839. "link",
  1840. "list",
  1841. "listbox",
  1842. "listitem",
  1843. "log",
  1844. "main",
  1845. "marquee",
  1846. "math",
  1847. "menu",
  1848. "menubar",
  1849. "menuitem",
  1850. "menuitemcheckbox",
  1851. "menuitemradio",
  1852. "navigation",
  1853. "none",
  1854. "note",
  1855. "option",
  1856. "presentation",
  1857. "progressbar",
  1858. "radio",
  1859. "radiogroup",
  1860. "region",
  1861. "row",
  1862. "rowgroup",
  1863. "rowheader",
  1864. "scrollbar",
  1865. "search",
  1866. "searchbox",
  1867. "separator",
  1868. "slider",
  1869. "spinbutton",
  1870. "status",
  1871. "switch",
  1872. "tab",
  1873. "table",
  1874. "tablist",
  1875. "tabpanel",
  1876. "term",
  1877. "textbox",
  1878. "timer",
  1879. "toolbar",
  1880. "tooltip",
  1881. "tree",
  1882. "treegrid",
  1883. "treeitem",
  1884. ]
  1885. ]
  1886. | None = None,
  1887. slot: Var[str] | str | None = None,
  1888. spell_check: Var[bool] | bool | None = None,
  1889. tab_index: Var[int] | int | None = None,
  1890. title: Var[str] | str | None = None,
  1891. style: Style | None = None,
  1892. key: Any | None = None,
  1893. id: Any | None = None,
  1894. class_name: Any | None = None,
  1895. autofocus: bool | None = None,
  1896. custom_attrs: dict[str, Var | Any] | None = None,
  1897. on_blur: Optional[EventType[()]] = None,
  1898. on_click: Optional[EventType[()]] = None,
  1899. on_context_menu: Optional[EventType[()]] = None,
  1900. on_double_click: Optional[EventType[()]] = None,
  1901. on_focus: Optional[EventType[()]] = None,
  1902. on_mount: Optional[EventType[()]] = None,
  1903. on_mouse_down: Optional[EventType[()]] = None,
  1904. on_mouse_enter: Optional[EventType[()]] = None,
  1905. on_mouse_leave: Optional[EventType[()]] = None,
  1906. on_mouse_move: Optional[EventType[()]] = None,
  1907. on_mouse_out: Optional[EventType[()]] = None,
  1908. on_mouse_over: Optional[EventType[()]] = None,
  1909. on_mouse_up: Optional[EventType[()]] = None,
  1910. on_scroll: Optional[EventType[()]] = None,
  1911. on_unmount: Optional[EventType[()]] = None,
  1912. **props,
  1913. ) -> "Meter":
  1914. """Create the component.
  1915. Args:
  1916. *children: The children of the component.
  1917. form: Associates the meter with a form (by id)
  1918. high: High limit of range (above this is considered high value)
  1919. low: Low limit of range (below this is considered low value)
  1920. max: Maximum value of the range
  1921. min: Minimum value of the range
  1922. optimum: Optimum value in the range
  1923. value: Current value of the meter
  1924. access_key: Provides a hint for generating a keyboard shortcut for the current element.
  1925. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
  1926. content_editable: Indicates whether the element's content is editable.
  1927. context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
  1928. dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
  1929. draggable: Defines whether the element can be dragged.
  1930. enter_key_hint: Hints what media types the media element is able to play.
  1931. hidden: Defines whether the element is hidden.
  1932. input_mode: Defines the type of the element.
  1933. item_prop: Defines the name of the element for metadata purposes.
  1934. lang: Defines the language used in the element.
  1935. role: Defines the role of the element.
  1936. slot: Assigns a slot in a shadow DOM shadow tree to an element.
  1937. spell_check: Defines whether the element may be checked for spelling errors.
  1938. tab_index: Defines the position of the current element in the tabbing order.
  1939. title: Defines a tooltip for the element.
  1940. style: The style of the component.
  1941. key: A unique key for the component.
  1942. id: The id for the component.
  1943. class_name: The class name for the component.
  1944. autofocus: Whether the component should take the focus once the page is loaded
  1945. custom_attrs: custom attribute
  1946. **props: The props of the component.
  1947. Returns:
  1948. The component.
  1949. """
  1950. ...
  1951. class Optgroup(BaseHTML):
  1952. @overload
  1953. @classmethod
  1954. def create( # type: ignore
  1955. cls,
  1956. *children,
  1957. disabled: Var[bool] | bool | None = None,
  1958. label: Var[str] | str | None = None,
  1959. access_key: Var[str] | str | None = None,
  1960. auto_capitalize: Literal[
  1961. "characters", "none", "off", "on", "sentences", "words"
  1962. ]
  1963. | Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
  1964. | None = None,
  1965. content_editable: Literal["inherit", "plaintext-only", False, True]
  1966. | Var[Literal["inherit", "plaintext-only", False, True]]
  1967. | None = None,
  1968. context_menu: Var[str] | str | None = None,
  1969. dir: Var[str] | str | None = None,
  1970. draggable: Var[bool] | bool | None = None,
  1971. enter_key_hint: Literal[
  1972. "done", "enter", "go", "next", "previous", "search", "send"
  1973. ]
  1974. | Var[Literal["done", "enter", "go", "next", "previous", "search", "send"]]
  1975. | None = None,
  1976. hidden: Var[bool] | bool | None = None,
  1977. input_mode: Literal[
  1978. "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
  1979. ]
  1980. | Var[
  1981. Literal[
  1982. "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
  1983. ]
  1984. ]
  1985. | None = None,
  1986. item_prop: Var[str] | str | None = None,
  1987. lang: Var[str] | str | None = None,
  1988. role: Literal[
  1989. "alert",
  1990. "alertdialog",
  1991. "application",
  1992. "article",
  1993. "banner",
  1994. "button",
  1995. "cell",
  1996. "checkbox",
  1997. "columnheader",
  1998. "combobox",
  1999. "complementary",
  2000. "contentinfo",
  2001. "definition",
  2002. "dialog",
  2003. "directory",
  2004. "document",
  2005. "feed",
  2006. "figure",
  2007. "form",
  2008. "grid",
  2009. "gridcell",
  2010. "group",
  2011. "heading",
  2012. "img",
  2013. "link",
  2014. "list",
  2015. "listbox",
  2016. "listitem",
  2017. "log",
  2018. "main",
  2019. "marquee",
  2020. "math",
  2021. "menu",
  2022. "menubar",
  2023. "menuitem",
  2024. "menuitemcheckbox",
  2025. "menuitemradio",
  2026. "navigation",
  2027. "none",
  2028. "note",
  2029. "option",
  2030. "presentation",
  2031. "progressbar",
  2032. "radio",
  2033. "radiogroup",
  2034. "region",
  2035. "row",
  2036. "rowgroup",
  2037. "rowheader",
  2038. "scrollbar",
  2039. "search",
  2040. "searchbox",
  2041. "separator",
  2042. "slider",
  2043. "spinbutton",
  2044. "status",
  2045. "switch",
  2046. "tab",
  2047. "table",
  2048. "tablist",
  2049. "tabpanel",
  2050. "term",
  2051. "textbox",
  2052. "timer",
  2053. "toolbar",
  2054. "tooltip",
  2055. "tree",
  2056. "treegrid",
  2057. "treeitem",
  2058. ]
  2059. | Var[
  2060. Literal[
  2061. "alert",
  2062. "alertdialog",
  2063. "application",
  2064. "article",
  2065. "banner",
  2066. "button",
  2067. "cell",
  2068. "checkbox",
  2069. "columnheader",
  2070. "combobox",
  2071. "complementary",
  2072. "contentinfo",
  2073. "definition",
  2074. "dialog",
  2075. "directory",
  2076. "document",
  2077. "feed",
  2078. "figure",
  2079. "form",
  2080. "grid",
  2081. "gridcell",
  2082. "group",
  2083. "heading",
  2084. "img",
  2085. "link",
  2086. "list",
  2087. "listbox",
  2088. "listitem",
  2089. "log",
  2090. "main",
  2091. "marquee",
  2092. "math",
  2093. "menu",
  2094. "menubar",
  2095. "menuitem",
  2096. "menuitemcheckbox",
  2097. "menuitemradio",
  2098. "navigation",
  2099. "none",
  2100. "note",
  2101. "option",
  2102. "presentation",
  2103. "progressbar",
  2104. "radio",
  2105. "radiogroup",
  2106. "region",
  2107. "row",
  2108. "rowgroup",
  2109. "rowheader",
  2110. "scrollbar",
  2111. "search",
  2112. "searchbox",
  2113. "separator",
  2114. "slider",
  2115. "spinbutton",
  2116. "status",
  2117. "switch",
  2118. "tab",
  2119. "table",
  2120. "tablist",
  2121. "tabpanel",
  2122. "term",
  2123. "textbox",
  2124. "timer",
  2125. "toolbar",
  2126. "tooltip",
  2127. "tree",
  2128. "treegrid",
  2129. "treeitem",
  2130. ]
  2131. ]
  2132. | None = None,
  2133. slot: Var[str] | str | None = None,
  2134. spell_check: Var[bool] | bool | None = None,
  2135. tab_index: Var[int] | int | None = None,
  2136. title: Var[str] | str | None = None,
  2137. style: Style | None = None,
  2138. key: Any | None = None,
  2139. id: Any | None = None,
  2140. class_name: Any | None = None,
  2141. autofocus: bool | None = None,
  2142. custom_attrs: dict[str, Var | Any] | None = None,
  2143. on_blur: Optional[EventType[()]] = None,
  2144. on_click: Optional[EventType[()]] = None,
  2145. on_context_menu: Optional[EventType[()]] = None,
  2146. on_double_click: Optional[EventType[()]] = None,
  2147. on_focus: Optional[EventType[()]] = None,
  2148. on_mount: Optional[EventType[()]] = None,
  2149. on_mouse_down: Optional[EventType[()]] = None,
  2150. on_mouse_enter: Optional[EventType[()]] = None,
  2151. on_mouse_leave: Optional[EventType[()]] = None,
  2152. on_mouse_move: Optional[EventType[()]] = None,
  2153. on_mouse_out: Optional[EventType[()]] = None,
  2154. on_mouse_over: Optional[EventType[()]] = None,
  2155. on_mouse_up: Optional[EventType[()]] = None,
  2156. on_scroll: Optional[EventType[()]] = None,
  2157. on_unmount: Optional[EventType[()]] = None,
  2158. **props,
  2159. ) -> "Optgroup":
  2160. """Create the component.
  2161. Args:
  2162. *children: The children of the component.
  2163. disabled: Disables the optgroup
  2164. label: Label for the optgroup
  2165. access_key: Provides a hint for generating a keyboard shortcut for the current element.
  2166. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
  2167. content_editable: Indicates whether the element's content is editable.
  2168. context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
  2169. dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
  2170. draggable: Defines whether the element can be dragged.
  2171. enter_key_hint: Hints what media types the media element is able to play.
  2172. hidden: Defines whether the element is hidden.
  2173. input_mode: Defines the type of the element.
  2174. item_prop: Defines the name of the element for metadata purposes.
  2175. lang: Defines the language used in the element.
  2176. role: Defines the role of the element.
  2177. slot: Assigns a slot in a shadow DOM shadow tree to an element.
  2178. spell_check: Defines whether the element may be checked for spelling errors.
  2179. tab_index: Defines the position of the current element in the tabbing order.
  2180. title: Defines a tooltip for the element.
  2181. style: The style of the component.
  2182. key: A unique key for the component.
  2183. id: The id for the component.
  2184. class_name: The class name for the component.
  2185. autofocus: Whether the component should take the focus once the page is loaded
  2186. custom_attrs: custom attribute
  2187. **props: The props of the component.
  2188. Returns:
  2189. The component.
  2190. """
  2191. ...
  2192. class Option(BaseHTML):
  2193. @overload
  2194. @classmethod
  2195. def create( # type: ignore
  2196. cls,
  2197. *children,
  2198. disabled: Var[bool] | bool | None = None,
  2199. label: Var[str] | str | None = None,
  2200. selected: Var[bool] | bool | None = None,
  2201. value: Var[float | int | str] | float | int | str | None = None,
  2202. access_key: Var[str] | str | None = None,
  2203. auto_capitalize: Literal[
  2204. "characters", "none", "off", "on", "sentences", "words"
  2205. ]
  2206. | Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
  2207. | None = None,
  2208. content_editable: Literal["inherit", "plaintext-only", False, True]
  2209. | Var[Literal["inherit", "plaintext-only", False, True]]
  2210. | None = None,
  2211. context_menu: Var[str] | str | None = None,
  2212. dir: Var[str] | str | None = None,
  2213. draggable: Var[bool] | bool | None = None,
  2214. enter_key_hint: Literal[
  2215. "done", "enter", "go", "next", "previous", "search", "send"
  2216. ]
  2217. | Var[Literal["done", "enter", "go", "next", "previous", "search", "send"]]
  2218. | None = None,
  2219. hidden: Var[bool] | bool | None = None,
  2220. input_mode: Literal[
  2221. "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
  2222. ]
  2223. | Var[
  2224. Literal[
  2225. "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
  2226. ]
  2227. ]
  2228. | None = None,
  2229. item_prop: Var[str] | str | None = None,
  2230. lang: Var[str] | str | None = None,
  2231. role: Literal[
  2232. "alert",
  2233. "alertdialog",
  2234. "application",
  2235. "article",
  2236. "banner",
  2237. "button",
  2238. "cell",
  2239. "checkbox",
  2240. "columnheader",
  2241. "combobox",
  2242. "complementary",
  2243. "contentinfo",
  2244. "definition",
  2245. "dialog",
  2246. "directory",
  2247. "document",
  2248. "feed",
  2249. "figure",
  2250. "form",
  2251. "grid",
  2252. "gridcell",
  2253. "group",
  2254. "heading",
  2255. "img",
  2256. "link",
  2257. "list",
  2258. "listbox",
  2259. "listitem",
  2260. "log",
  2261. "main",
  2262. "marquee",
  2263. "math",
  2264. "menu",
  2265. "menubar",
  2266. "menuitem",
  2267. "menuitemcheckbox",
  2268. "menuitemradio",
  2269. "navigation",
  2270. "none",
  2271. "note",
  2272. "option",
  2273. "presentation",
  2274. "progressbar",
  2275. "radio",
  2276. "radiogroup",
  2277. "region",
  2278. "row",
  2279. "rowgroup",
  2280. "rowheader",
  2281. "scrollbar",
  2282. "search",
  2283. "searchbox",
  2284. "separator",
  2285. "slider",
  2286. "spinbutton",
  2287. "status",
  2288. "switch",
  2289. "tab",
  2290. "table",
  2291. "tablist",
  2292. "tabpanel",
  2293. "term",
  2294. "textbox",
  2295. "timer",
  2296. "toolbar",
  2297. "tooltip",
  2298. "tree",
  2299. "treegrid",
  2300. "treeitem",
  2301. ]
  2302. | Var[
  2303. Literal[
  2304. "alert",
  2305. "alertdialog",
  2306. "application",
  2307. "article",
  2308. "banner",
  2309. "button",
  2310. "cell",
  2311. "checkbox",
  2312. "columnheader",
  2313. "combobox",
  2314. "complementary",
  2315. "contentinfo",
  2316. "definition",
  2317. "dialog",
  2318. "directory",
  2319. "document",
  2320. "feed",
  2321. "figure",
  2322. "form",
  2323. "grid",
  2324. "gridcell",
  2325. "group",
  2326. "heading",
  2327. "img",
  2328. "link",
  2329. "list",
  2330. "listbox",
  2331. "listitem",
  2332. "log",
  2333. "main",
  2334. "marquee",
  2335. "math",
  2336. "menu",
  2337. "menubar",
  2338. "menuitem",
  2339. "menuitemcheckbox",
  2340. "menuitemradio",
  2341. "navigation",
  2342. "none",
  2343. "note",
  2344. "option",
  2345. "presentation",
  2346. "progressbar",
  2347. "radio",
  2348. "radiogroup",
  2349. "region",
  2350. "row",
  2351. "rowgroup",
  2352. "rowheader",
  2353. "scrollbar",
  2354. "search",
  2355. "searchbox",
  2356. "separator",
  2357. "slider",
  2358. "spinbutton",
  2359. "status",
  2360. "switch",
  2361. "tab",
  2362. "table",
  2363. "tablist",
  2364. "tabpanel",
  2365. "term",
  2366. "textbox",
  2367. "timer",
  2368. "toolbar",
  2369. "tooltip",
  2370. "tree",
  2371. "treegrid",
  2372. "treeitem",
  2373. ]
  2374. ]
  2375. | None = None,
  2376. slot: Var[str] | str | None = None,
  2377. spell_check: Var[bool] | bool | None = None,
  2378. tab_index: Var[int] | int | None = None,
  2379. title: Var[str] | str | None = None,
  2380. style: Style | None = None,
  2381. key: Any | None = None,
  2382. id: Any | None = None,
  2383. class_name: Any | None = None,
  2384. autofocus: bool | None = None,
  2385. custom_attrs: dict[str, Var | Any] | None = None,
  2386. on_blur: Optional[EventType[()]] = None,
  2387. on_click: Optional[EventType[()]] = None,
  2388. on_context_menu: Optional[EventType[()]] = None,
  2389. on_double_click: Optional[EventType[()]] = None,
  2390. on_focus: Optional[EventType[()]] = None,
  2391. on_mount: Optional[EventType[()]] = None,
  2392. on_mouse_down: Optional[EventType[()]] = None,
  2393. on_mouse_enter: Optional[EventType[()]] = None,
  2394. on_mouse_leave: Optional[EventType[()]] = None,
  2395. on_mouse_move: Optional[EventType[()]] = None,
  2396. on_mouse_out: Optional[EventType[()]] = None,
  2397. on_mouse_over: Optional[EventType[()]] = None,
  2398. on_mouse_up: Optional[EventType[()]] = None,
  2399. on_scroll: Optional[EventType[()]] = None,
  2400. on_unmount: Optional[EventType[()]] = None,
  2401. **props,
  2402. ) -> "Option":
  2403. """Create the component.
  2404. Args:
  2405. *children: The children of the component.
  2406. disabled: Disables the option
  2407. label: Label for the option, if the text is not the label
  2408. selected: Indicates that the option is initially selected
  2409. value: Value to be sent as form data
  2410. access_key: Provides a hint for generating a keyboard shortcut for the current element.
  2411. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
  2412. content_editable: Indicates whether the element's content is editable.
  2413. context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
  2414. dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
  2415. draggable: Defines whether the element can be dragged.
  2416. enter_key_hint: Hints what media types the media element is able to play.
  2417. hidden: Defines whether the element is hidden.
  2418. input_mode: Defines the type of the element.
  2419. item_prop: Defines the name of the element for metadata purposes.
  2420. lang: Defines the language used in the element.
  2421. role: Defines the role of the element.
  2422. slot: Assigns a slot in a shadow DOM shadow tree to an element.
  2423. spell_check: Defines whether the element may be checked for spelling errors.
  2424. tab_index: Defines the position of the current element in the tabbing order.
  2425. title: Defines a tooltip for the element.
  2426. style: The style of the component.
  2427. key: A unique key for the component.
  2428. id: The id for the component.
  2429. class_name: The class name for the component.
  2430. autofocus: Whether the component should take the focus once the page is loaded
  2431. custom_attrs: custom attribute
  2432. **props: The props of the component.
  2433. Returns:
  2434. The component.
  2435. """
  2436. ...
  2437. class Output(BaseHTML):
  2438. @overload
  2439. @classmethod
  2440. def create( # type: ignore
  2441. cls,
  2442. *children,
  2443. html_for: Var[str] | str | None = None,
  2444. form: Var[str] | str | None = None,
  2445. name: Var[str] | str | None = None,
  2446. access_key: Var[str] | str | None = None,
  2447. auto_capitalize: Literal[
  2448. "characters", "none", "off", "on", "sentences", "words"
  2449. ]
  2450. | Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
  2451. | None = None,
  2452. content_editable: Literal["inherit", "plaintext-only", False, True]
  2453. | Var[Literal["inherit", "plaintext-only", False, True]]
  2454. | None = None,
  2455. context_menu: Var[str] | str | None = None,
  2456. dir: Var[str] | str | None = None,
  2457. draggable: Var[bool] | bool | None = None,
  2458. enter_key_hint: Literal[
  2459. "done", "enter", "go", "next", "previous", "search", "send"
  2460. ]
  2461. | Var[Literal["done", "enter", "go", "next", "previous", "search", "send"]]
  2462. | None = None,
  2463. hidden: Var[bool] | bool | None = None,
  2464. input_mode: Literal[
  2465. "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
  2466. ]
  2467. | Var[
  2468. Literal[
  2469. "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
  2470. ]
  2471. ]
  2472. | None = None,
  2473. item_prop: Var[str] | str | None = None,
  2474. lang: Var[str] | str | None = None,
  2475. role: Literal[
  2476. "alert",
  2477. "alertdialog",
  2478. "application",
  2479. "article",
  2480. "banner",
  2481. "button",
  2482. "cell",
  2483. "checkbox",
  2484. "columnheader",
  2485. "combobox",
  2486. "complementary",
  2487. "contentinfo",
  2488. "definition",
  2489. "dialog",
  2490. "directory",
  2491. "document",
  2492. "feed",
  2493. "figure",
  2494. "form",
  2495. "grid",
  2496. "gridcell",
  2497. "group",
  2498. "heading",
  2499. "img",
  2500. "link",
  2501. "list",
  2502. "listbox",
  2503. "listitem",
  2504. "log",
  2505. "main",
  2506. "marquee",
  2507. "math",
  2508. "menu",
  2509. "menubar",
  2510. "menuitem",
  2511. "menuitemcheckbox",
  2512. "menuitemradio",
  2513. "navigation",
  2514. "none",
  2515. "note",
  2516. "option",
  2517. "presentation",
  2518. "progressbar",
  2519. "radio",
  2520. "radiogroup",
  2521. "region",
  2522. "row",
  2523. "rowgroup",
  2524. "rowheader",
  2525. "scrollbar",
  2526. "search",
  2527. "searchbox",
  2528. "separator",
  2529. "slider",
  2530. "spinbutton",
  2531. "status",
  2532. "switch",
  2533. "tab",
  2534. "table",
  2535. "tablist",
  2536. "tabpanel",
  2537. "term",
  2538. "textbox",
  2539. "timer",
  2540. "toolbar",
  2541. "tooltip",
  2542. "tree",
  2543. "treegrid",
  2544. "treeitem",
  2545. ]
  2546. | Var[
  2547. Literal[
  2548. "alert",
  2549. "alertdialog",
  2550. "application",
  2551. "article",
  2552. "banner",
  2553. "button",
  2554. "cell",
  2555. "checkbox",
  2556. "columnheader",
  2557. "combobox",
  2558. "complementary",
  2559. "contentinfo",
  2560. "definition",
  2561. "dialog",
  2562. "directory",
  2563. "document",
  2564. "feed",
  2565. "figure",
  2566. "form",
  2567. "grid",
  2568. "gridcell",
  2569. "group",
  2570. "heading",
  2571. "img",
  2572. "link",
  2573. "list",
  2574. "listbox",
  2575. "listitem",
  2576. "log",
  2577. "main",
  2578. "marquee",
  2579. "math",
  2580. "menu",
  2581. "menubar",
  2582. "menuitem",
  2583. "menuitemcheckbox",
  2584. "menuitemradio",
  2585. "navigation",
  2586. "none",
  2587. "note",
  2588. "option",
  2589. "presentation",
  2590. "progressbar",
  2591. "radio",
  2592. "radiogroup",
  2593. "region",
  2594. "row",
  2595. "rowgroup",
  2596. "rowheader",
  2597. "scrollbar",
  2598. "search",
  2599. "searchbox",
  2600. "separator",
  2601. "slider",
  2602. "spinbutton",
  2603. "status",
  2604. "switch",
  2605. "tab",
  2606. "table",
  2607. "tablist",
  2608. "tabpanel",
  2609. "term",
  2610. "textbox",
  2611. "timer",
  2612. "toolbar",
  2613. "tooltip",
  2614. "tree",
  2615. "treegrid",
  2616. "treeitem",
  2617. ]
  2618. ]
  2619. | None = None,
  2620. slot: Var[str] | str | None = None,
  2621. spell_check: Var[bool] | bool | None = None,
  2622. tab_index: Var[int] | int | None = None,
  2623. title: Var[str] | str | None = None,
  2624. style: Style | None = None,
  2625. key: Any | None = None,
  2626. id: Any | None = None,
  2627. class_name: Any | None = None,
  2628. autofocus: bool | None = None,
  2629. custom_attrs: dict[str, Var | Any] | None = None,
  2630. on_blur: Optional[EventType[()]] = None,
  2631. on_click: Optional[EventType[()]] = None,
  2632. on_context_menu: Optional[EventType[()]] = None,
  2633. on_double_click: Optional[EventType[()]] = None,
  2634. on_focus: Optional[EventType[()]] = None,
  2635. on_mount: Optional[EventType[()]] = None,
  2636. on_mouse_down: Optional[EventType[()]] = None,
  2637. on_mouse_enter: Optional[EventType[()]] = None,
  2638. on_mouse_leave: Optional[EventType[()]] = None,
  2639. on_mouse_move: Optional[EventType[()]] = None,
  2640. on_mouse_out: Optional[EventType[()]] = None,
  2641. on_mouse_over: Optional[EventType[()]] = None,
  2642. on_mouse_up: Optional[EventType[()]] = None,
  2643. on_scroll: Optional[EventType[()]] = None,
  2644. on_unmount: Optional[EventType[()]] = None,
  2645. **props,
  2646. ) -> "Output":
  2647. """Create the component.
  2648. Args:
  2649. *children: The children of the component.
  2650. html_for: Associates the output with one or more elements (by their IDs)
  2651. form: Associates the output with a form (by id)
  2652. name: Name of the output element for form submission
  2653. access_key: Provides a hint for generating a keyboard shortcut for the current element.
  2654. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
  2655. content_editable: Indicates whether the element's content is editable.
  2656. context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
  2657. dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
  2658. draggable: Defines whether the element can be dragged.
  2659. enter_key_hint: Hints what media types the media element is able to play.
  2660. hidden: Defines whether the element is hidden.
  2661. input_mode: Defines the type of the element.
  2662. item_prop: Defines the name of the element for metadata purposes.
  2663. lang: Defines the language used in the element.
  2664. role: Defines the role of the element.
  2665. slot: Assigns a slot in a shadow DOM shadow tree to an element.
  2666. spell_check: Defines whether the element may be checked for spelling errors.
  2667. tab_index: Defines the position of the current element in the tabbing order.
  2668. title: Defines a tooltip for the element.
  2669. style: The style of the component.
  2670. key: A unique key for the component.
  2671. id: The id for the component.
  2672. class_name: The class name for the component.
  2673. autofocus: Whether the component should take the focus once the page is loaded
  2674. custom_attrs: custom attribute
  2675. **props: The props of the component.
  2676. Returns:
  2677. The component.
  2678. """
  2679. ...
  2680. class Progress(BaseHTML):
  2681. @overload
  2682. @classmethod
  2683. def create( # type: ignore
  2684. cls,
  2685. *children,
  2686. form: Var[str] | str | None = None,
  2687. max: Var[float | int | str] | float | int | str | None = None,
  2688. value: Var[float | int | str] | float | int | str | None = None,
  2689. access_key: Var[str] | str | None = None,
  2690. auto_capitalize: Literal[
  2691. "characters", "none", "off", "on", "sentences", "words"
  2692. ]
  2693. | Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
  2694. | None = None,
  2695. content_editable: Literal["inherit", "plaintext-only", False, True]
  2696. | Var[Literal["inherit", "plaintext-only", False, True]]
  2697. | None = None,
  2698. context_menu: Var[str] | str | None = None,
  2699. dir: Var[str] | str | None = None,
  2700. draggable: Var[bool] | bool | None = None,
  2701. enter_key_hint: Literal[
  2702. "done", "enter", "go", "next", "previous", "search", "send"
  2703. ]
  2704. | Var[Literal["done", "enter", "go", "next", "previous", "search", "send"]]
  2705. | None = None,
  2706. hidden: Var[bool] | bool | None = None,
  2707. input_mode: Literal[
  2708. "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
  2709. ]
  2710. | Var[
  2711. Literal[
  2712. "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
  2713. ]
  2714. ]
  2715. | None = None,
  2716. item_prop: Var[str] | str | None = None,
  2717. lang: Var[str] | str | None = None,
  2718. role: Literal[
  2719. "alert",
  2720. "alertdialog",
  2721. "application",
  2722. "article",
  2723. "banner",
  2724. "button",
  2725. "cell",
  2726. "checkbox",
  2727. "columnheader",
  2728. "combobox",
  2729. "complementary",
  2730. "contentinfo",
  2731. "definition",
  2732. "dialog",
  2733. "directory",
  2734. "document",
  2735. "feed",
  2736. "figure",
  2737. "form",
  2738. "grid",
  2739. "gridcell",
  2740. "group",
  2741. "heading",
  2742. "img",
  2743. "link",
  2744. "list",
  2745. "listbox",
  2746. "listitem",
  2747. "log",
  2748. "main",
  2749. "marquee",
  2750. "math",
  2751. "menu",
  2752. "menubar",
  2753. "menuitem",
  2754. "menuitemcheckbox",
  2755. "menuitemradio",
  2756. "navigation",
  2757. "none",
  2758. "note",
  2759. "option",
  2760. "presentation",
  2761. "progressbar",
  2762. "radio",
  2763. "radiogroup",
  2764. "region",
  2765. "row",
  2766. "rowgroup",
  2767. "rowheader",
  2768. "scrollbar",
  2769. "search",
  2770. "searchbox",
  2771. "separator",
  2772. "slider",
  2773. "spinbutton",
  2774. "status",
  2775. "switch",
  2776. "tab",
  2777. "table",
  2778. "tablist",
  2779. "tabpanel",
  2780. "term",
  2781. "textbox",
  2782. "timer",
  2783. "toolbar",
  2784. "tooltip",
  2785. "tree",
  2786. "treegrid",
  2787. "treeitem",
  2788. ]
  2789. | Var[
  2790. Literal[
  2791. "alert",
  2792. "alertdialog",
  2793. "application",
  2794. "article",
  2795. "banner",
  2796. "button",
  2797. "cell",
  2798. "checkbox",
  2799. "columnheader",
  2800. "combobox",
  2801. "complementary",
  2802. "contentinfo",
  2803. "definition",
  2804. "dialog",
  2805. "directory",
  2806. "document",
  2807. "feed",
  2808. "figure",
  2809. "form",
  2810. "grid",
  2811. "gridcell",
  2812. "group",
  2813. "heading",
  2814. "img",
  2815. "link",
  2816. "list",
  2817. "listbox",
  2818. "listitem",
  2819. "log",
  2820. "main",
  2821. "marquee",
  2822. "math",
  2823. "menu",
  2824. "menubar",
  2825. "menuitem",
  2826. "menuitemcheckbox",
  2827. "menuitemradio",
  2828. "navigation",
  2829. "none",
  2830. "note",
  2831. "option",
  2832. "presentation",
  2833. "progressbar",
  2834. "radio",
  2835. "radiogroup",
  2836. "region",
  2837. "row",
  2838. "rowgroup",
  2839. "rowheader",
  2840. "scrollbar",
  2841. "search",
  2842. "searchbox",
  2843. "separator",
  2844. "slider",
  2845. "spinbutton",
  2846. "status",
  2847. "switch",
  2848. "tab",
  2849. "table",
  2850. "tablist",
  2851. "tabpanel",
  2852. "term",
  2853. "textbox",
  2854. "timer",
  2855. "toolbar",
  2856. "tooltip",
  2857. "tree",
  2858. "treegrid",
  2859. "treeitem",
  2860. ]
  2861. ]
  2862. | None = None,
  2863. slot: Var[str] | str | None = None,
  2864. spell_check: Var[bool] | bool | None = None,
  2865. tab_index: Var[int] | int | None = None,
  2866. title: Var[str] | str | None = None,
  2867. style: Style | None = None,
  2868. key: Any | None = None,
  2869. id: Any | None = None,
  2870. class_name: Any | None = None,
  2871. autofocus: bool | None = None,
  2872. custom_attrs: dict[str, Var | Any] | None = None,
  2873. on_blur: Optional[EventType[()]] = None,
  2874. on_click: Optional[EventType[()]] = None,
  2875. on_context_menu: Optional[EventType[()]] = None,
  2876. on_double_click: Optional[EventType[()]] = None,
  2877. on_focus: Optional[EventType[()]] = None,
  2878. on_mount: Optional[EventType[()]] = None,
  2879. on_mouse_down: Optional[EventType[()]] = None,
  2880. on_mouse_enter: Optional[EventType[()]] = None,
  2881. on_mouse_leave: Optional[EventType[()]] = None,
  2882. on_mouse_move: Optional[EventType[()]] = None,
  2883. on_mouse_out: Optional[EventType[()]] = None,
  2884. on_mouse_over: Optional[EventType[()]] = None,
  2885. on_mouse_up: Optional[EventType[()]] = None,
  2886. on_scroll: Optional[EventType[()]] = None,
  2887. on_unmount: Optional[EventType[()]] = None,
  2888. **props,
  2889. ) -> "Progress":
  2890. """Create the component.
  2891. Args:
  2892. *children: The children of the component.
  2893. form: Associates the progress element with a form (by id)
  2894. max: Maximum value of the progress indicator
  2895. value: Current value of the progress indicator
  2896. access_key: Provides a hint for generating a keyboard shortcut for the current element.
  2897. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
  2898. content_editable: Indicates whether the element's content is editable.
  2899. context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
  2900. dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
  2901. draggable: Defines whether the element can be dragged.
  2902. enter_key_hint: Hints what media types the media element is able to play.
  2903. hidden: Defines whether the element is hidden.
  2904. input_mode: Defines the type of the element.
  2905. item_prop: Defines the name of the element for metadata purposes.
  2906. lang: Defines the language used in the element.
  2907. role: Defines the role of the element.
  2908. slot: Assigns a slot in a shadow DOM shadow tree to an element.
  2909. spell_check: Defines whether the element may be checked for spelling errors.
  2910. tab_index: Defines the position of the current element in the tabbing order.
  2911. title: Defines a tooltip for the element.
  2912. style: The style of the component.
  2913. key: A unique key for the component.
  2914. id: The id for the component.
  2915. class_name: The class name for the component.
  2916. autofocus: Whether the component should take the focus once the page is loaded
  2917. custom_attrs: custom attribute
  2918. **props: The props of the component.
  2919. Returns:
  2920. The component.
  2921. """
  2922. ...
  2923. class Select(BaseHTML):
  2924. @overload
  2925. @classmethod
  2926. def create( # type: ignore
  2927. cls,
  2928. *children,
  2929. auto_complete: Var[str] | str | None = None,
  2930. auto_focus: Var[bool] | bool | None = None,
  2931. disabled: Var[bool] | bool | None = None,
  2932. form: Var[str] | str | None = None,
  2933. multiple: Var[bool] | bool | None = None,
  2934. name: Var[str] | str | None = None,
  2935. required: Var[bool] | bool | None = None,
  2936. size: Var[int] | int | None = None,
  2937. access_key: Var[str] | str | None = None,
  2938. auto_capitalize: Literal[
  2939. "characters", "none", "off", "on", "sentences", "words"
  2940. ]
  2941. | Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
  2942. | None = None,
  2943. content_editable: Literal["inherit", "plaintext-only", False, True]
  2944. | Var[Literal["inherit", "plaintext-only", False, True]]
  2945. | None = None,
  2946. context_menu: Var[str] | str | None = None,
  2947. dir: Var[str] | str | None = None,
  2948. draggable: Var[bool] | bool | None = None,
  2949. enter_key_hint: Literal[
  2950. "done", "enter", "go", "next", "previous", "search", "send"
  2951. ]
  2952. | Var[Literal["done", "enter", "go", "next", "previous", "search", "send"]]
  2953. | None = None,
  2954. hidden: Var[bool] | bool | None = None,
  2955. input_mode: Literal[
  2956. "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
  2957. ]
  2958. | Var[
  2959. Literal[
  2960. "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
  2961. ]
  2962. ]
  2963. | None = None,
  2964. item_prop: Var[str] | str | None = None,
  2965. lang: Var[str] | str | None = None,
  2966. role: Literal[
  2967. "alert",
  2968. "alertdialog",
  2969. "application",
  2970. "article",
  2971. "banner",
  2972. "button",
  2973. "cell",
  2974. "checkbox",
  2975. "columnheader",
  2976. "combobox",
  2977. "complementary",
  2978. "contentinfo",
  2979. "definition",
  2980. "dialog",
  2981. "directory",
  2982. "document",
  2983. "feed",
  2984. "figure",
  2985. "form",
  2986. "grid",
  2987. "gridcell",
  2988. "group",
  2989. "heading",
  2990. "img",
  2991. "link",
  2992. "list",
  2993. "listbox",
  2994. "listitem",
  2995. "log",
  2996. "main",
  2997. "marquee",
  2998. "math",
  2999. "menu",
  3000. "menubar",
  3001. "menuitem",
  3002. "menuitemcheckbox",
  3003. "menuitemradio",
  3004. "navigation",
  3005. "none",
  3006. "note",
  3007. "option",
  3008. "presentation",
  3009. "progressbar",
  3010. "radio",
  3011. "radiogroup",
  3012. "region",
  3013. "row",
  3014. "rowgroup",
  3015. "rowheader",
  3016. "scrollbar",
  3017. "search",
  3018. "searchbox",
  3019. "separator",
  3020. "slider",
  3021. "spinbutton",
  3022. "status",
  3023. "switch",
  3024. "tab",
  3025. "table",
  3026. "tablist",
  3027. "tabpanel",
  3028. "term",
  3029. "textbox",
  3030. "timer",
  3031. "toolbar",
  3032. "tooltip",
  3033. "tree",
  3034. "treegrid",
  3035. "treeitem",
  3036. ]
  3037. | Var[
  3038. Literal[
  3039. "alert",
  3040. "alertdialog",
  3041. "application",
  3042. "article",
  3043. "banner",
  3044. "button",
  3045. "cell",
  3046. "checkbox",
  3047. "columnheader",
  3048. "combobox",
  3049. "complementary",
  3050. "contentinfo",
  3051. "definition",
  3052. "dialog",
  3053. "directory",
  3054. "document",
  3055. "feed",
  3056. "figure",
  3057. "form",
  3058. "grid",
  3059. "gridcell",
  3060. "group",
  3061. "heading",
  3062. "img",
  3063. "link",
  3064. "list",
  3065. "listbox",
  3066. "listitem",
  3067. "log",
  3068. "main",
  3069. "marquee",
  3070. "math",
  3071. "menu",
  3072. "menubar",
  3073. "menuitem",
  3074. "menuitemcheckbox",
  3075. "menuitemradio",
  3076. "navigation",
  3077. "none",
  3078. "note",
  3079. "option",
  3080. "presentation",
  3081. "progressbar",
  3082. "radio",
  3083. "radiogroup",
  3084. "region",
  3085. "row",
  3086. "rowgroup",
  3087. "rowheader",
  3088. "scrollbar",
  3089. "search",
  3090. "searchbox",
  3091. "separator",
  3092. "slider",
  3093. "spinbutton",
  3094. "status",
  3095. "switch",
  3096. "tab",
  3097. "table",
  3098. "tablist",
  3099. "tabpanel",
  3100. "term",
  3101. "textbox",
  3102. "timer",
  3103. "toolbar",
  3104. "tooltip",
  3105. "tree",
  3106. "treegrid",
  3107. "treeitem",
  3108. ]
  3109. ]
  3110. | None = None,
  3111. slot: Var[str] | str | None = None,
  3112. spell_check: Var[bool] | bool | None = None,
  3113. tab_index: Var[int] | int | None = None,
  3114. title: Var[str] | str | None = None,
  3115. style: Style | None = None,
  3116. key: Any | None = None,
  3117. id: Any | None = None,
  3118. class_name: Any | None = None,
  3119. autofocus: bool | None = None,
  3120. custom_attrs: dict[str, Var | Any] | None = None,
  3121. on_blur: Optional[EventType[()]] = None,
  3122. on_change: Optional[EventType[()] | EventType[str]] = None,
  3123. on_click: Optional[EventType[()]] = None,
  3124. on_context_menu: Optional[EventType[()]] = None,
  3125. on_double_click: Optional[EventType[()]] = None,
  3126. on_focus: Optional[EventType[()]] = None,
  3127. on_mount: Optional[EventType[()]] = None,
  3128. on_mouse_down: Optional[EventType[()]] = None,
  3129. on_mouse_enter: Optional[EventType[()]] = None,
  3130. on_mouse_leave: Optional[EventType[()]] = None,
  3131. on_mouse_move: Optional[EventType[()]] = None,
  3132. on_mouse_out: Optional[EventType[()]] = None,
  3133. on_mouse_over: Optional[EventType[()]] = None,
  3134. on_mouse_up: Optional[EventType[()]] = None,
  3135. on_scroll: Optional[EventType[()]] = None,
  3136. on_unmount: Optional[EventType[()]] = None,
  3137. **props,
  3138. ) -> "Select":
  3139. """Create the component.
  3140. Args:
  3141. *children: The children of the component.
  3142. auto_complete: Whether the form control should have autocomplete enabled
  3143. auto_focus: Automatically focuses the select when the page loads
  3144. disabled: Disables the select control
  3145. form: Associates the select with a form (by id)
  3146. multiple: Indicates that multiple options can be selected
  3147. name: Name of the select, used when submitting the form
  3148. required: Indicates that the select control must have a selected option
  3149. size: Number of visible options in a drop-down list
  3150. on_change: Fired when the select value changes
  3151. access_key: Provides a hint for generating a keyboard shortcut for the current element.
  3152. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
  3153. content_editable: Indicates whether the element's content is editable.
  3154. context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
  3155. dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
  3156. draggable: Defines whether the element can be dragged.
  3157. enter_key_hint: Hints what media types the media element is able to play.
  3158. hidden: Defines whether the element is hidden.
  3159. input_mode: Defines the type of the element.
  3160. item_prop: Defines the name of the element for metadata purposes.
  3161. lang: Defines the language used in the element.
  3162. role: Defines the role of the element.
  3163. slot: Assigns a slot in a shadow DOM shadow tree to an element.
  3164. spell_check: Defines whether the element may be checked for spelling errors.
  3165. tab_index: Defines the position of the current element in the tabbing order.
  3166. title: Defines a tooltip for the element.
  3167. style: The style of the component.
  3168. key: A unique key for the component.
  3169. id: The id for the component.
  3170. class_name: The class name for the component.
  3171. autofocus: Whether the component should take the focus once the page is loaded
  3172. custom_attrs: custom attribute
  3173. **props: The props of the component.
  3174. Returns:
  3175. The component.
  3176. """
  3177. ...
  3178. 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'
  3179. 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"
  3180. class Textarea(BaseHTML):
  3181. @overload
  3182. @classmethod
  3183. def create( # type: ignore
  3184. cls,
  3185. *children,
  3186. auto_complete: Var[str] | str | None = None,
  3187. auto_focus: Var[bool] | bool | None = None,
  3188. auto_height: Var[bool] | bool | None = None,
  3189. cols: Var[int] | int | None = None,
  3190. default_value: Var[str] | str | None = None,
  3191. dirname: Var[str] | str | None = None,
  3192. disabled: Var[bool] | bool | None = None,
  3193. enter_key_submit: Var[bool] | bool | None = None,
  3194. form: Var[str] | str | None = None,
  3195. max_length: Var[int] | int | None = None,
  3196. min_length: Var[int] | int | None = None,
  3197. name: Var[str] | str | None = None,
  3198. placeholder: Var[str] | str | None = None,
  3199. read_only: Var[bool] | bool | None = None,
  3200. required: Var[bool] | bool | None = None,
  3201. rows: Var[int] | int | None = None,
  3202. value: Var[str] | str | None = None,
  3203. wrap: Var[str] | str | None = None,
  3204. access_key: Var[str] | str | None = None,
  3205. auto_capitalize: Literal[
  3206. "characters", "none", "off", "on", "sentences", "words"
  3207. ]
  3208. | Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
  3209. | None = None,
  3210. content_editable: Literal["inherit", "plaintext-only", False, True]
  3211. | Var[Literal["inherit", "plaintext-only", False, True]]
  3212. | None = None,
  3213. context_menu: Var[str] | str | None = None,
  3214. dir: Var[str] | str | None = None,
  3215. draggable: Var[bool] | bool | None = None,
  3216. enter_key_hint: Literal[
  3217. "done", "enter", "go", "next", "previous", "search", "send"
  3218. ]
  3219. | Var[Literal["done", "enter", "go", "next", "previous", "search", "send"]]
  3220. | None = None,
  3221. hidden: Var[bool] | bool | None = None,
  3222. input_mode: Literal[
  3223. "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
  3224. ]
  3225. | Var[
  3226. Literal[
  3227. "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
  3228. ]
  3229. ]
  3230. | None = None,
  3231. item_prop: Var[str] | str | None = None,
  3232. lang: Var[str] | str | None = None,
  3233. role: Literal[
  3234. "alert",
  3235. "alertdialog",
  3236. "application",
  3237. "article",
  3238. "banner",
  3239. "button",
  3240. "cell",
  3241. "checkbox",
  3242. "columnheader",
  3243. "combobox",
  3244. "complementary",
  3245. "contentinfo",
  3246. "definition",
  3247. "dialog",
  3248. "directory",
  3249. "document",
  3250. "feed",
  3251. "figure",
  3252. "form",
  3253. "grid",
  3254. "gridcell",
  3255. "group",
  3256. "heading",
  3257. "img",
  3258. "link",
  3259. "list",
  3260. "listbox",
  3261. "listitem",
  3262. "log",
  3263. "main",
  3264. "marquee",
  3265. "math",
  3266. "menu",
  3267. "menubar",
  3268. "menuitem",
  3269. "menuitemcheckbox",
  3270. "menuitemradio",
  3271. "navigation",
  3272. "none",
  3273. "note",
  3274. "option",
  3275. "presentation",
  3276. "progressbar",
  3277. "radio",
  3278. "radiogroup",
  3279. "region",
  3280. "row",
  3281. "rowgroup",
  3282. "rowheader",
  3283. "scrollbar",
  3284. "search",
  3285. "searchbox",
  3286. "separator",
  3287. "slider",
  3288. "spinbutton",
  3289. "status",
  3290. "switch",
  3291. "tab",
  3292. "table",
  3293. "tablist",
  3294. "tabpanel",
  3295. "term",
  3296. "textbox",
  3297. "timer",
  3298. "toolbar",
  3299. "tooltip",
  3300. "tree",
  3301. "treegrid",
  3302. "treeitem",
  3303. ]
  3304. | Var[
  3305. Literal[
  3306. "alert",
  3307. "alertdialog",
  3308. "application",
  3309. "article",
  3310. "banner",
  3311. "button",
  3312. "cell",
  3313. "checkbox",
  3314. "columnheader",
  3315. "combobox",
  3316. "complementary",
  3317. "contentinfo",
  3318. "definition",
  3319. "dialog",
  3320. "directory",
  3321. "document",
  3322. "feed",
  3323. "figure",
  3324. "form",
  3325. "grid",
  3326. "gridcell",
  3327. "group",
  3328. "heading",
  3329. "img",
  3330. "link",
  3331. "list",
  3332. "listbox",
  3333. "listitem",
  3334. "log",
  3335. "main",
  3336. "marquee",
  3337. "math",
  3338. "menu",
  3339. "menubar",
  3340. "menuitem",
  3341. "menuitemcheckbox",
  3342. "menuitemradio",
  3343. "navigation",
  3344. "none",
  3345. "note",
  3346. "option",
  3347. "presentation",
  3348. "progressbar",
  3349. "radio",
  3350. "radiogroup",
  3351. "region",
  3352. "row",
  3353. "rowgroup",
  3354. "rowheader",
  3355. "scrollbar",
  3356. "search",
  3357. "searchbox",
  3358. "separator",
  3359. "slider",
  3360. "spinbutton",
  3361. "status",
  3362. "switch",
  3363. "tab",
  3364. "table",
  3365. "tablist",
  3366. "tabpanel",
  3367. "term",
  3368. "textbox",
  3369. "timer",
  3370. "toolbar",
  3371. "tooltip",
  3372. "tree",
  3373. "treegrid",
  3374. "treeitem",
  3375. ]
  3376. ]
  3377. | None = None,
  3378. slot: Var[str] | str | None = None,
  3379. spell_check: Var[bool] | bool | None = None,
  3380. tab_index: Var[int] | int | None = None,
  3381. title: Var[str] | str | None = None,
  3382. style: Style | None = None,
  3383. key: Any | None = None,
  3384. id: Any | None = None,
  3385. class_name: Any | None = None,
  3386. autofocus: bool | None = None,
  3387. custom_attrs: dict[str, Var | Any] | None = None,
  3388. on_blur: Optional[EventType[()] | EventType[str]] = None,
  3389. on_change: Optional[EventType[()] | EventType[str]] = None,
  3390. on_click: Optional[EventType[()]] = None,
  3391. on_context_menu: Optional[EventType[()]] = None,
  3392. on_double_click: Optional[EventType[()]] = None,
  3393. on_focus: Optional[EventType[()] | EventType[str]] = None,
  3394. on_key_down: Optional[
  3395. EventType[()] | EventType[str] | EventType[str, KeyInputInfo]
  3396. ] = None,
  3397. on_key_up: Optional[
  3398. EventType[()] | EventType[str] | EventType[str, KeyInputInfo]
  3399. ] = None,
  3400. on_mount: Optional[EventType[()]] = None,
  3401. on_mouse_down: Optional[EventType[()]] = None,
  3402. on_mouse_enter: Optional[EventType[()]] = None,
  3403. on_mouse_leave: Optional[EventType[()]] = None,
  3404. on_mouse_move: Optional[EventType[()]] = None,
  3405. on_mouse_out: Optional[EventType[()]] = None,
  3406. on_mouse_over: Optional[EventType[()]] = None,
  3407. on_mouse_up: Optional[EventType[()]] = None,
  3408. on_scroll: Optional[EventType[()]] = None,
  3409. on_unmount: Optional[EventType[()]] = None,
  3410. **props,
  3411. ) -> "Textarea":
  3412. """Create a textarea component.
  3413. Args:
  3414. *children: The children of the textarea.
  3415. auto_complete: Whether the form control should have autocomplete enabled
  3416. auto_focus: Automatically focuses the textarea when the page loads
  3417. auto_height: Automatically fit the content height to the text (use min-height with this prop)
  3418. cols: Visible width of the text control, in average character widths
  3419. default_value: The default value of the textarea when initially rendered
  3420. dirname: Name part of the textarea to submit in 'dir' and 'name' pair when form is submitted
  3421. disabled: Disables the textarea
  3422. enter_key_submit: Enter key submits form (shift-enter adds new line)
  3423. form: Associates the textarea with a form (by id)
  3424. max_length: Maximum number of characters allowed in the textarea
  3425. min_length: Minimum number of characters required in the textarea
  3426. name: Name of the textarea, used when submitting the form
  3427. placeholder: Placeholder text in the textarea
  3428. read_only: Indicates whether the textarea is read-only
  3429. required: Indicates that the textarea is required
  3430. rows: Visible number of lines in the text control
  3431. value: The controlled value of the textarea, read only unless used with on_change
  3432. wrap: How the text in the textarea is to be wrapped when submitting the form
  3433. on_change: Fired when the input value changes
  3434. on_focus: Fired when the input gains focus
  3435. on_blur: Fired when the input loses focus
  3436. on_key_down: Fired when a key is pressed down
  3437. on_key_up: Fired when a key is released
  3438. access_key: Provides a hint for generating a keyboard shortcut for the current element.
  3439. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
  3440. content_editable: Indicates whether the element's content is editable.
  3441. context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
  3442. dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
  3443. draggable: Defines whether the element can be dragged.
  3444. enter_key_hint: Hints what media types the media element is able to play.
  3445. hidden: Defines whether the element is hidden.
  3446. input_mode: Defines the type of the element.
  3447. item_prop: Defines the name of the element for metadata purposes.
  3448. lang: Defines the language used in the element.
  3449. role: Defines the role of the element.
  3450. slot: Assigns a slot in a shadow DOM shadow tree to an element.
  3451. spell_check: Defines whether the element may be checked for spelling errors.
  3452. tab_index: Defines the position of the current element in the tabbing order.
  3453. title: Defines a tooltip for the element.
  3454. style: The style of the component.
  3455. key: A unique key for the component.
  3456. id: The id for the component.
  3457. class_name: The class name for the component.
  3458. autofocus: Whether the component should take the focus once the page is loaded
  3459. custom_attrs: custom attribute
  3460. **props: The properties of the textarea.
  3461. Returns:
  3462. The textarea component.
  3463. Raises:
  3464. ValueError: when `enter_key_submit` is combined with `on_key_down`.
  3465. """
  3466. ...
  3467. button = Button.create
  3468. datalist = Datalist.create
  3469. fieldset = Fieldset.create
  3470. form = Form.create
  3471. input = Input.create
  3472. label = Label.create
  3473. legend = Legend.create
  3474. meter = Meter.create
  3475. optgroup = Optgroup.create
  3476. option = Option.create
  3477. output = Output.create
  3478. progress = Progress.create
  3479. select = Select.create
  3480. textarea = Textarea.create