@@ -15,6 +15,10 @@ def image(
1515 value : Union [str , bytes ] = "" ,
1616 attributes : Optional [Dict [str , Any ]] = None ,
1717) -> VdomDict :
18+ """Utility for constructing an image from a string or bytes
19+
20+ The source value will automatically be encoded to base64
21+ """
1822 if format == "svg" :
1923 format = "svg+xml"
2024
@@ -38,6 +42,7 @@ async def Input(
3842 cast : Optional [Callable [[str ], Any ]] = None ,
3943 ignore_empty : bool = True ,
4044) -> VdomDict :
45+ """Utility for making an ``<input/>`` with a callback"""
4146 attrs = attributes or {}
4247 value , set_value = idom .hooks .use_state (value )
4348
@@ -55,6 +60,14 @@ async def on_change(event: Dict[str, Any]) -> None:
5560
5661
5762class Html :
63+ """Utility for making basic HTML elements
64+
65+ Many basic elements already have constructors, however accessing an attribute
66+ of any name on this object will return a constructor for an element with the
67+ same ``tagName``.
68+
69+ All constructors return :class:`~idom.core.vdom.VdomDict`.
70+ """
5871
5972 __call__ = staticmethod (component )
6073
@@ -158,3 +171,7 @@ def __getattr__(self, tag: str) -> VdomDictConstructor:
158171
159172
160173html = Html ()
174+ """Holds pre-made constructors for basic HTML elements
175+
176+ See :class:`Html` for more info.
177+ """
0 commit comments