ui.dict
Dict element
Will render a dict or list data as a formatted json in the browser
from uiwiz import ui
ui.dict({"name": "John Doe", "age": 50})
ui.dict({"name": "John Doe", "age": 50}, copy_to_clipboard=True).border_classes("")
Constructor
data: UnionNo default required argument
copy_to_clipboard: bool= False
Methods
after_render(html: str) -> str
This method is called after the element is rendered.
:param html: The rendered HTML of the element.
before_render() -> Any
No documentation providedborder_classes(classes: str) -> Any
No documentation providedclasses(input: str) -> Self
Set tailwind classes for the element.
:param input: The tailwind classes to apply to the element.
:return: The current instance of the element.
generate(data: Any) -> Any
No documentation providedget_classes() -> str
Get html classes of the element.
:return: The classes of the element.
:type: str
key_classes(classes: Any) -> Any
No documentation providedrender(render_script: bool) -> str
Render the element as HTML.
:param render_script: If any element has a javascript script, it will be rendered as well.
:type render_script: bool
size(size: Literal) -> Self
Set the size of the element.
:param size: The size of the element.
:return: The current instance of the element.
value_classes(classes: Any) -> Any
No documentation provided