html.pyi 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. """Stub file for reflex/components/layout/html.py"""
  2. # ------------------- DO NOT EDIT ----------------------
  3. # This file was generated by `scripts/pyi_generator.py`!
  4. # ------------------------------------------------------
  5. from typing import Any, Dict, Literal, Optional, Union, overload
  6. from reflex.vars import Var, BaseVar, ComputedVar
  7. from reflex.event import EventChain, EventHandler, EventSpec
  8. from reflex.style import Style
  9. from typing import Dict
  10. from reflex.components.layout.box import Box
  11. from reflex.vars import Var
  12. class Html(Box):
  13. @overload
  14. @classmethod
  15. def create( # type: ignore
  16. cls,
  17. *children,
  18. dangerouslySetInnerHTML: Optional[
  19. Union[Var[Dict[str, str]], Dict[str, str]]
  20. ] = None,
  21. element: Optional[Union[Var[str], str]] = None,
  22. src: Optional[Union[Var[str], str]] = None,
  23. alt: Optional[Union[Var[str], str]] = None,
  24. style: Optional[Style] = None,
  25. key: Optional[Any] = None,
  26. id: Optional[Any] = None,
  27. class_name: Optional[Any] = None,
  28. autofocus: Optional[bool] = None,
  29. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  30. on_blur: Optional[
  31. Union[EventHandler, EventSpec, list, function, BaseVar]
  32. ] = None,
  33. on_click: Optional[
  34. Union[EventHandler, EventSpec, list, function, BaseVar]
  35. ] = None,
  36. on_context_menu: Optional[
  37. Union[EventHandler, EventSpec, list, function, BaseVar]
  38. ] = None,
  39. on_double_click: Optional[
  40. Union[EventHandler, EventSpec, list, function, BaseVar]
  41. ] = None,
  42. on_focus: Optional[
  43. Union[EventHandler, EventSpec, list, function, BaseVar]
  44. ] = None,
  45. on_mount: Optional[
  46. Union[EventHandler, EventSpec, list, function, BaseVar]
  47. ] = None,
  48. on_mouse_down: Optional[
  49. Union[EventHandler, EventSpec, list, function, BaseVar]
  50. ] = None,
  51. on_mouse_enter: Optional[
  52. Union[EventHandler, EventSpec, list, function, BaseVar]
  53. ] = None,
  54. on_mouse_leave: Optional[
  55. Union[EventHandler, EventSpec, list, function, BaseVar]
  56. ] = None,
  57. on_mouse_move: Optional[
  58. Union[EventHandler, EventSpec, list, function, BaseVar]
  59. ] = None,
  60. on_mouse_out: Optional[
  61. Union[EventHandler, EventSpec, list, function, BaseVar]
  62. ] = None,
  63. on_mouse_over: Optional[
  64. Union[EventHandler, EventSpec, list, function, BaseVar]
  65. ] = None,
  66. on_mouse_up: Optional[
  67. Union[EventHandler, EventSpec, list, function, BaseVar]
  68. ] = None,
  69. on_scroll: Optional[
  70. Union[EventHandler, EventSpec, list, function, BaseVar]
  71. ] = None,
  72. on_unmount: Optional[
  73. Union[EventHandler, EventSpec, list, function, BaseVar]
  74. ] = None,
  75. **props
  76. ) -> "Html":
  77. """Create a html component.
  78. Args:
  79. *children: The children of the component.
  80. dangerouslySetInnerHTML: The HTML to render.
  81. element: The type element to render. You can specify an image, video, or any other HTML element such as iframe.
  82. src: The source of the content.
  83. alt: The alt text of the content.
  84. style: The style of the component.
  85. key: A unique key for the component.
  86. id: The id for the component.
  87. class_name: The class name for the component.
  88. autofocus: Whether the component should take the focus once the page is loaded
  89. custom_attrs: custom attribute
  90. **props: The props to pass to the component.
  91. Returns:
  92. The html component.
  93. Raises:
  94. ValueError: If children are not provided or more than one child is provided.
  95. """
  96. ...