HtmlTags Module

class epyk.core.html.HtmlTags.HtmlComment(page: PageModel, vals, html_code: Optional[str] = None, options: Optional[Union[bool, dict]] = None, profile: Optional[Union[List[Union[str, JsDataModel]], str]] = None, css_attrs: Optional[dict] = None)
class epyk.core.html.HtmlTags.HtmlGeneric(page: PageModel, tag: str, text: Union[str, list, HtmlModel], width: tuple, height: tuple, html_code: Optional[str], tooltip: str, options: Optional[dict], profile: Optional[Union[bool, dict]])
property dom: JsHtmlRich

Return all the Javascript functions defined for an HTML Component.

Those functions will use plain javascript by default.

Returns:

A Javascript Dom object

error(status: bool = True, label: str = '', data: Optional[Union[str, JsDataModel, float, dict, list, bool]] = None)

Display an error message in the component.

Usage:

btn.click([
    t.error(True, label="`Error: ${data.result}`", data={"result": "Wrong Parameter"}),
])
Parameters:
  • status – The message status (true is active)

  • label – The message template

  • data – The message parameter to feed the template

loading(status: bool = True, label: str = "`<i class='fas fa-cog fa-spin' style='margin-right:5px'></i>Loading....`", data: Optional[Union[str, JsDataModel, float, dict, list, bool]] = None)

Display a loading message in the component.

Usage:

btn.click([
    t.loading(True, label="`Loading: ${data.result}`", data={"result": "Waiting for response"}),
])
Parameters:
  • status – The message status (true is active)

  • label – The message template

  • data – The message parameter to feed the template

property options: OptionsText

Property to set all the possible object for a button.