drawer.pyi 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546
  1. """Stub file for reflex/components/radix/primitives/drawer.py"""
  2. # ------------------- DO NOT EDIT ----------------------
  3. # This file was generated by `reflex/utils/pyi_generator.py`!
  4. # ------------------------------------------------------
  5. from typing import Any, Dict, List, Literal, Optional, Union, overload
  6. from reflex.components.component import ComponentNamespace
  7. from reflex.components.radix.primitives.base import RadixPrimitiveComponent
  8. from reflex.event import EventType
  9. from reflex.style import Style
  10. from reflex.vars.base import Var
  11. class DrawerComponent(RadixPrimitiveComponent):
  12. @overload
  13. @classmethod
  14. def create( # type: ignore
  15. cls,
  16. *children,
  17. as_child: Optional[Union[Var[bool], bool]] = None,
  18. style: Optional[Style] = None,
  19. key: Optional[Any] = None,
  20. id: Optional[Any] = None,
  21. class_name: Optional[Any] = None,
  22. autofocus: Optional[bool] = None,
  23. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  24. on_blur: Optional[EventType[[]]] = None,
  25. on_click: Optional[EventType[[]]] = None,
  26. on_context_menu: Optional[EventType[[]]] = None,
  27. on_double_click: Optional[EventType[[]]] = None,
  28. on_focus: Optional[EventType[[]]] = None,
  29. on_mount: Optional[EventType[[]]] = None,
  30. on_mouse_down: Optional[EventType[[]]] = None,
  31. on_mouse_enter: Optional[EventType[[]]] = None,
  32. on_mouse_leave: Optional[EventType[[]]] = None,
  33. on_mouse_move: Optional[EventType[[]]] = None,
  34. on_mouse_out: Optional[EventType[[]]] = None,
  35. on_mouse_over: Optional[EventType[[]]] = None,
  36. on_mouse_up: Optional[EventType[[]]] = None,
  37. on_scroll: Optional[EventType[[]]] = None,
  38. on_unmount: Optional[EventType[[]]] = None,
  39. **props,
  40. ) -> "DrawerComponent":
  41. """Create the component.
  42. Args:
  43. *children: The children of the component.
  44. as_child: Change the default rendered element for the one passed as a child.
  45. style: The style of the component.
  46. key: A unique key for the component.
  47. id: The id for the component.
  48. class_name: The class name for the component.
  49. autofocus: Whether the component should take the focus once the page is loaded
  50. custom_attrs: custom attribute
  51. **props: The props of the component.
  52. Returns:
  53. The component.
  54. """
  55. ...
  56. LiteralDirectionType = Literal["top", "bottom", "left", "right"]
  57. class DrawerRoot(DrawerComponent):
  58. @overload
  59. @classmethod
  60. def create( # type: ignore
  61. cls,
  62. *children,
  63. open: Optional[Union[Var[bool], bool]] = None,
  64. should_scale_background: Optional[Union[Var[bool], bool]] = None,
  65. close_threshold: Optional[Union[Var[float], float]] = None,
  66. snap_points: Optional[List[Union[float, str]]] = None,
  67. fade_from_index: Optional[Union[Var[int], int]] = None,
  68. scroll_lock_timeout: Optional[Union[Var[int], int]] = None,
  69. modal: Optional[Union[Var[bool], bool]] = None,
  70. direction: Optional[
  71. Union[
  72. Literal["bottom", "left", "right", "top"],
  73. Var[Literal["bottom", "left", "right", "top"]],
  74. ]
  75. ] = None,
  76. preventScrollRestoration: Optional[Union[Var[bool], bool]] = None,
  77. as_child: Optional[Union[Var[bool], bool]] = None,
  78. style: Optional[Style] = None,
  79. key: Optional[Any] = None,
  80. id: Optional[Any] = None,
  81. class_name: Optional[Any] = None,
  82. autofocus: Optional[bool] = None,
  83. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  84. on_blur: Optional[EventType[[]]] = None,
  85. on_click: Optional[EventType[[]]] = None,
  86. on_context_menu: Optional[EventType[[]]] = None,
  87. on_double_click: Optional[EventType[[]]] = None,
  88. on_focus: Optional[EventType[[]]] = None,
  89. on_mount: Optional[EventType[[]]] = None,
  90. on_mouse_down: Optional[EventType[[]]] = None,
  91. on_mouse_enter: Optional[EventType[[]]] = None,
  92. on_mouse_leave: Optional[EventType[[]]] = None,
  93. on_mouse_move: Optional[EventType[[]]] = None,
  94. on_mouse_out: Optional[EventType[[]]] = None,
  95. on_mouse_over: Optional[EventType[[]]] = None,
  96. on_mouse_up: Optional[EventType[[]]] = None,
  97. on_open_change: Optional[EventType[bool]] = None,
  98. on_scroll: Optional[EventType[[]]] = None,
  99. on_unmount: Optional[EventType[[]]] = None,
  100. **props,
  101. ) -> "DrawerRoot":
  102. """Create the component.
  103. Args:
  104. *children: The children of the component.
  105. open: Whether the drawer is open or not.
  106. should_scale_background: Enable background scaling, it requires an element with [vaul-drawer-wrapper] data attribute to scale its background.
  107. close_threshold: Number between 0 and 1 that determines when the drawer should be closed.
  108. snap_points: Array of numbers from 0 to 100 that corresponds to % of the screen a given snap point should take up. Should go from least visible. Also Accept px values, which doesn't take screen height into account.
  109. fade_from_index: Index of a snapPoint from which the overlay fade should be applied. Defaults to the last snap point.
  110. scroll_lock_timeout: Duration for which the drawer is not draggable after scrolling content inside of the drawer. Defaults to 500ms
  111. modal: When `False`, it allows to interact with elements outside of the drawer without closing it. Defaults to `True`.
  112. direction: Direction of the drawer. Defaults to `"bottom"`
  113. preventScrollRestoration: When `True`, it prevents scroll restoration. Defaults to `True`.
  114. as_child: Change the default rendered element for the one passed as a child.
  115. style: The style of the component.
  116. key: A unique key for the component.
  117. id: The id for the component.
  118. class_name: The class name for the component.
  119. autofocus: Whether the component should take the focus once the page is loaded
  120. custom_attrs: custom attribute
  121. **props: The props of the component.
  122. Returns:
  123. The component.
  124. """
  125. ...
  126. class DrawerTrigger(DrawerComponent):
  127. @overload
  128. @classmethod
  129. def create( # type: ignore
  130. cls,
  131. *children,
  132. as_child: Optional[Union[Var[bool], bool]] = None,
  133. style: Optional[Style] = None,
  134. key: Optional[Any] = None,
  135. id: Optional[Any] = None,
  136. class_name: Optional[Any] = None,
  137. autofocus: Optional[bool] = None,
  138. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  139. on_blur: Optional[EventType[[]]] = None,
  140. on_click: Optional[EventType[[]]] = None,
  141. on_context_menu: Optional[EventType[[]]] = None,
  142. on_double_click: Optional[EventType[[]]] = None,
  143. on_focus: Optional[EventType[[]]] = None,
  144. on_mount: Optional[EventType[[]]] = None,
  145. on_mouse_down: Optional[EventType[[]]] = None,
  146. on_mouse_enter: Optional[EventType[[]]] = None,
  147. on_mouse_leave: Optional[EventType[[]]] = None,
  148. on_mouse_move: Optional[EventType[[]]] = None,
  149. on_mouse_out: Optional[EventType[[]]] = None,
  150. on_mouse_over: Optional[EventType[[]]] = None,
  151. on_mouse_up: Optional[EventType[[]]] = None,
  152. on_scroll: Optional[EventType[[]]] = None,
  153. on_unmount: Optional[EventType[[]]] = None,
  154. **props,
  155. ) -> "DrawerTrigger":
  156. """Create a new DrawerTrigger instance.
  157. Args:
  158. children: The children of the element.
  159. props: The properties of the element.
  160. Returns:
  161. The new DrawerTrigger instance.
  162. """
  163. ...
  164. class DrawerPortal(DrawerComponent):
  165. @overload
  166. @classmethod
  167. def create( # type: ignore
  168. cls,
  169. *children,
  170. as_child: Optional[Union[Var[bool], bool]] = None,
  171. style: Optional[Style] = None,
  172. key: Optional[Any] = None,
  173. id: Optional[Any] = None,
  174. class_name: Optional[Any] = None,
  175. autofocus: Optional[bool] = None,
  176. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  177. on_blur: Optional[EventType[[]]] = None,
  178. on_click: Optional[EventType[[]]] = None,
  179. on_context_menu: Optional[EventType[[]]] = None,
  180. on_double_click: Optional[EventType[[]]] = None,
  181. on_focus: Optional[EventType[[]]] = None,
  182. on_mount: Optional[EventType[[]]] = None,
  183. on_mouse_down: Optional[EventType[[]]] = None,
  184. on_mouse_enter: Optional[EventType[[]]] = None,
  185. on_mouse_leave: Optional[EventType[[]]] = None,
  186. on_mouse_move: Optional[EventType[[]]] = None,
  187. on_mouse_out: Optional[EventType[[]]] = None,
  188. on_mouse_over: Optional[EventType[[]]] = None,
  189. on_mouse_up: Optional[EventType[[]]] = None,
  190. on_scroll: Optional[EventType[[]]] = None,
  191. on_unmount: Optional[EventType[[]]] = None,
  192. **props,
  193. ) -> "DrawerPortal":
  194. """Create the component.
  195. Args:
  196. *children: The children of the component.
  197. as_child: Change the default rendered element for the one passed as a child.
  198. style: The style of the component.
  199. key: A unique key for the component.
  200. id: The id for the component.
  201. class_name: The class name for the component.
  202. autofocus: Whether the component should take the focus once the page is loaded
  203. custom_attrs: custom attribute
  204. **props: The props of the component.
  205. Returns:
  206. The component.
  207. """
  208. ...
  209. class DrawerContent(DrawerComponent):
  210. @overload
  211. @classmethod
  212. def create( # type: ignore
  213. cls,
  214. *children,
  215. as_child: Optional[Union[Var[bool], bool]] = None,
  216. style: Optional[Style] = None,
  217. key: Optional[Any] = None,
  218. id: Optional[Any] = None,
  219. class_name: Optional[Any] = None,
  220. autofocus: Optional[bool] = None,
  221. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  222. on_blur: Optional[EventType[[]]] = None,
  223. on_click: Optional[EventType[[]]] = None,
  224. on_close_auto_focus: Optional[EventType[[]]] = None,
  225. on_context_menu: Optional[EventType[[]]] = None,
  226. on_double_click: Optional[EventType[[]]] = None,
  227. on_escape_key_down: Optional[EventType[[]]] = None,
  228. on_focus: Optional[EventType[[]]] = None,
  229. on_interact_outside: Optional[EventType[[]]] = None,
  230. on_mount: Optional[EventType[[]]] = None,
  231. on_mouse_down: Optional[EventType[[]]] = None,
  232. on_mouse_enter: Optional[EventType[[]]] = None,
  233. on_mouse_leave: Optional[EventType[[]]] = None,
  234. on_mouse_move: Optional[EventType[[]]] = None,
  235. on_mouse_out: Optional[EventType[[]]] = None,
  236. on_mouse_over: Optional[EventType[[]]] = None,
  237. on_mouse_up: Optional[EventType[[]]] = None,
  238. on_open_auto_focus: Optional[EventType[[]]] = None,
  239. on_pointer_down_outside: Optional[EventType[[]]] = None,
  240. on_scroll: Optional[EventType[[]]] = None,
  241. on_unmount: Optional[EventType[[]]] = None,
  242. **props,
  243. ) -> "DrawerContent":
  244. """Create a Drawer Content.
  245. We wrap the Drawer content in an `rx.theme` to make radix themes definitions available to
  246. rendered div in the DOM. This is because Vaul Drawer injects the Drawer overlay content in a sibling
  247. div to the root div rendered by radix which contains styling definitions. Wrapping in `rx.theme`
  248. makes the styling available to the overlay.
  249. Args:
  250. *children: The list of children to use.
  251. as_child: Change the default rendered element for the one passed as a child.
  252. style: The style of the component.
  253. key: A unique key for the component.
  254. id: The id for the component.
  255. class_name: The class name for the component.
  256. autofocus: Whether the component should take the focus once the page is loaded
  257. custom_attrs: custom attribute
  258. **props: Additional properties to apply to the drawer content.
  259. Returns:
  260. The drawer content.
  261. """
  262. ...
  263. class DrawerOverlay(DrawerComponent):
  264. @overload
  265. @classmethod
  266. def create( # type: ignore
  267. cls,
  268. *children,
  269. as_child: Optional[Union[Var[bool], bool]] = None,
  270. style: Optional[Style] = None,
  271. key: Optional[Any] = None,
  272. id: Optional[Any] = None,
  273. class_name: Optional[Any] = None,
  274. autofocus: Optional[bool] = None,
  275. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  276. on_blur: Optional[EventType[[]]] = None,
  277. on_click: Optional[EventType[[]]] = None,
  278. on_context_menu: Optional[EventType[[]]] = None,
  279. on_double_click: Optional[EventType[[]]] = None,
  280. on_focus: Optional[EventType[[]]] = None,
  281. on_mount: Optional[EventType[[]]] = None,
  282. on_mouse_down: Optional[EventType[[]]] = None,
  283. on_mouse_enter: Optional[EventType[[]]] = None,
  284. on_mouse_leave: Optional[EventType[[]]] = None,
  285. on_mouse_move: Optional[EventType[[]]] = None,
  286. on_mouse_out: Optional[EventType[[]]] = None,
  287. on_mouse_over: Optional[EventType[[]]] = None,
  288. on_mouse_up: Optional[EventType[[]]] = None,
  289. on_scroll: Optional[EventType[[]]] = None,
  290. on_unmount: Optional[EventType[[]]] = None,
  291. **props,
  292. ) -> "DrawerOverlay":
  293. """Create the component.
  294. Args:
  295. *children: The children of the component.
  296. as_child: Change the default rendered element for the one passed as a child.
  297. style: The style of the component.
  298. key: A unique key for the component.
  299. id: The id for the component.
  300. class_name: The class name for the component.
  301. autofocus: Whether the component should take the focus once the page is loaded
  302. custom_attrs: custom attribute
  303. **props: The props of the component.
  304. Returns:
  305. The component.
  306. """
  307. ...
  308. class DrawerClose(DrawerTrigger):
  309. @overload
  310. @classmethod
  311. def create( # type: ignore
  312. cls,
  313. *children,
  314. as_child: Optional[Union[Var[bool], bool]] = None,
  315. style: Optional[Style] = None,
  316. key: Optional[Any] = None,
  317. id: Optional[Any] = None,
  318. class_name: Optional[Any] = None,
  319. autofocus: Optional[bool] = None,
  320. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  321. on_blur: Optional[EventType[[]]] = None,
  322. on_click: Optional[EventType[[]]] = None,
  323. on_context_menu: Optional[EventType[[]]] = None,
  324. on_double_click: Optional[EventType[[]]] = None,
  325. on_focus: Optional[EventType[[]]] = None,
  326. on_mount: Optional[EventType[[]]] = None,
  327. on_mouse_down: Optional[EventType[[]]] = None,
  328. on_mouse_enter: Optional[EventType[[]]] = None,
  329. on_mouse_leave: Optional[EventType[[]]] = None,
  330. on_mouse_move: Optional[EventType[[]]] = None,
  331. on_mouse_out: Optional[EventType[[]]] = None,
  332. on_mouse_over: Optional[EventType[[]]] = None,
  333. on_mouse_up: Optional[EventType[[]]] = None,
  334. on_scroll: Optional[EventType[[]]] = None,
  335. on_unmount: Optional[EventType[[]]] = None,
  336. **props,
  337. ) -> "DrawerClose":
  338. """Create a new DrawerTrigger instance.
  339. Args:
  340. children: The children of the element.
  341. props: The properties of the element.
  342. Returns:
  343. The new DrawerTrigger instance.
  344. """
  345. ...
  346. class DrawerTitle(DrawerComponent):
  347. @overload
  348. @classmethod
  349. def create( # type: ignore
  350. cls,
  351. *children,
  352. as_child: Optional[Union[Var[bool], bool]] = None,
  353. style: Optional[Style] = None,
  354. key: Optional[Any] = None,
  355. id: Optional[Any] = None,
  356. class_name: Optional[Any] = None,
  357. autofocus: Optional[bool] = None,
  358. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  359. on_blur: Optional[EventType[[]]] = None,
  360. on_click: Optional[EventType[[]]] = None,
  361. on_context_menu: Optional[EventType[[]]] = None,
  362. on_double_click: Optional[EventType[[]]] = None,
  363. on_focus: Optional[EventType[[]]] = None,
  364. on_mount: Optional[EventType[[]]] = None,
  365. on_mouse_down: Optional[EventType[[]]] = None,
  366. on_mouse_enter: Optional[EventType[[]]] = None,
  367. on_mouse_leave: Optional[EventType[[]]] = None,
  368. on_mouse_move: Optional[EventType[[]]] = None,
  369. on_mouse_out: Optional[EventType[[]]] = None,
  370. on_mouse_over: Optional[EventType[[]]] = None,
  371. on_mouse_up: Optional[EventType[[]]] = None,
  372. on_scroll: Optional[EventType[[]]] = None,
  373. on_unmount: Optional[EventType[[]]] = None,
  374. **props,
  375. ) -> "DrawerTitle":
  376. """Create the component.
  377. Args:
  378. *children: The children of the component.
  379. as_child: Change the default rendered element for the one passed as a child.
  380. style: The style of the component.
  381. key: A unique key for the component.
  382. id: The id for the component.
  383. class_name: The class name for the component.
  384. autofocus: Whether the component should take the focus once the page is loaded
  385. custom_attrs: custom attribute
  386. **props: The props of the component.
  387. Returns:
  388. The component.
  389. """
  390. ...
  391. class DrawerDescription(DrawerComponent):
  392. @overload
  393. @classmethod
  394. def create( # type: ignore
  395. cls,
  396. *children,
  397. as_child: Optional[Union[Var[bool], bool]] = None,
  398. style: Optional[Style] = None,
  399. key: Optional[Any] = None,
  400. id: Optional[Any] = None,
  401. class_name: Optional[Any] = None,
  402. autofocus: Optional[bool] = None,
  403. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  404. on_blur: Optional[EventType[[]]] = None,
  405. on_click: Optional[EventType[[]]] = None,
  406. on_context_menu: Optional[EventType[[]]] = None,
  407. on_double_click: Optional[EventType[[]]] = None,
  408. on_focus: Optional[EventType[[]]] = None,
  409. on_mount: Optional[EventType[[]]] = None,
  410. on_mouse_down: Optional[EventType[[]]] = None,
  411. on_mouse_enter: Optional[EventType[[]]] = None,
  412. on_mouse_leave: Optional[EventType[[]]] = None,
  413. on_mouse_move: Optional[EventType[[]]] = None,
  414. on_mouse_out: Optional[EventType[[]]] = None,
  415. on_mouse_over: Optional[EventType[[]]] = None,
  416. on_mouse_up: Optional[EventType[[]]] = None,
  417. on_scroll: Optional[EventType[[]]] = None,
  418. on_unmount: Optional[EventType[[]]] = None,
  419. **props,
  420. ) -> "DrawerDescription":
  421. """Create the component.
  422. Args:
  423. *children: The children of the component.
  424. as_child: Change the default rendered element for the one passed as a child.
  425. style: The style of the component.
  426. key: A unique key for the component.
  427. id: The id for the component.
  428. class_name: The class name for the component.
  429. autofocus: Whether the component should take the focus once the page is loaded
  430. custom_attrs: custom attribute
  431. **props: The props of the component.
  432. Returns:
  433. The component.
  434. """
  435. ...
  436. class Drawer(ComponentNamespace):
  437. root = staticmethod(DrawerRoot.create)
  438. trigger = staticmethod(DrawerTrigger.create)
  439. portal = staticmethod(DrawerPortal.create)
  440. content = staticmethod(DrawerContent.create)
  441. overlay = staticmethod(DrawerOverlay.create)
  442. close = staticmethod(DrawerClose.create)
  443. title = staticmethod(DrawerTitle.create)
  444. description = staticmethod(DrawerDescription.create)
  445. @staticmethod
  446. def __call__(
  447. *children,
  448. open: Optional[Union[Var[bool], bool]] = None,
  449. should_scale_background: Optional[Union[Var[bool], bool]] = None,
  450. close_threshold: Optional[Union[Var[float], float]] = None,
  451. snap_points: Optional[List[Union[float, str]]] = None,
  452. fade_from_index: Optional[Union[Var[int], int]] = None,
  453. scroll_lock_timeout: Optional[Union[Var[int], int]] = None,
  454. modal: Optional[Union[Var[bool], bool]] = None,
  455. direction: Optional[
  456. Union[
  457. Literal["bottom", "left", "right", "top"],
  458. Var[Literal["bottom", "left", "right", "top"]],
  459. ]
  460. ] = None,
  461. preventScrollRestoration: Optional[Union[Var[bool], bool]] = None,
  462. as_child: Optional[Union[Var[bool], bool]] = None,
  463. style: Optional[Style] = None,
  464. key: Optional[Any] = None,
  465. id: Optional[Any] = None,
  466. class_name: Optional[Any] = None,
  467. autofocus: Optional[bool] = None,
  468. custom_attrs: Optional[Dict[str, Union[Var, str]]] = 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_open_change: Optional[EventType[bool]] = None,
  483. on_scroll: Optional[EventType[[]]] = None,
  484. on_unmount: Optional[EventType[[]]] = None,
  485. **props,
  486. ) -> "DrawerRoot":
  487. """Create the component.
  488. Args:
  489. *children: The children of the component.
  490. open: Whether the drawer is open or not.
  491. should_scale_background: Enable background scaling, it requires an element with [vaul-drawer-wrapper] data attribute to scale its background.
  492. close_threshold: Number between 0 and 1 that determines when the drawer should be closed.
  493. snap_points: Array of numbers from 0 to 100 that corresponds to % of the screen a given snap point should take up. Should go from least visible. Also Accept px values, which doesn't take screen height into account.
  494. fade_from_index: Index of a snapPoint from which the overlay fade should be applied. Defaults to the last snap point.
  495. scroll_lock_timeout: Duration for which the drawer is not draggable after scrolling content inside of the drawer. Defaults to 500ms
  496. modal: When `False`, it allows to interact with elements outside of the drawer without closing it. Defaults to `True`.
  497. direction: Direction of the drawer. Defaults to `"bottom"`
  498. preventScrollRestoration: When `True`, it prevents scroll restoration. Defaults to `True`.
  499. as_child: Change the default rendered element for the one passed as a child.
  500. style: The style of the component.
  501. key: A unique key for the component.
  502. id: The id for the component.
  503. class_name: The class name for the component.
  504. autofocus: Whether the component should take the focus once the page is loaded
  505. custom_attrs: custom attribute
  506. **props: The props of the component.
  507. Returns:
  508. The component.
  509. """
  510. ...
  511. drawer = Drawer()