HTMLComponent Abstract Base Types¶
- class BaseComponent¶
- Parameters:
show (bool) – A Boolean attribute that controls the visibility of the component.
debug (bool) – A Boolean attribute that enables or disables debugging for the component.
twsty_tags (list, optional) – is a list of tailwind tags (see py_tailwind_utils)
style (str) – A property to get and set the inline style for the HTML component.
key (str, optional) – A key to be associated with the component.
- Default show:
True
- Default debug:
False
- Default twsty_tags:
[]
- Variables:
style – A property to get and set the inline style for the HTML component.
classes – A list that stores Tailwind CSS classes applied to the component.
key – A key to be associated with the component.
- remove_twsty_tags(*args)¶
Removes specified Tailwind tags from the component.
- Parameters:
*args (str) – A variable number of arguments representing the specified Tailwind tags to remove.
- add_twsty_tags(*args)¶
Adds Tailwind tags to the component.
- Parameters:
*args (str) – A variable number of arguments representing the specified Tailwind tags to add.
- replace_twsty_tags(*args)¶
Replaces the existing Tailwind tags with the ones provided in *args.
- Parameters:
*args (str) – A variable number of arguments representing the specified Tailwind tags to replace.
- class PassiveHCComponent¶
Inherits
BaseComponent
- Variables:
text – The text
- Parameters:
text (str, optional) – The text content to be displayed within the component.
- class PassiveDivComponent¶
Inherits
BaseComponent
- Parameters:
childs (list) – A list of child components to be associated with the parent.
- Variables:
components – The list of child components associated with the parent.
- class ActiveBaseComponent¶
Inherits
BaseComponent
- Parameters:
event_prehook (Callable, optional) – A prehook function to be applied to all event handlers.
on_click – handler for click event
on_mouseover – handler for mouseover event
on_mouseout – handler for mouseout event
on_mouseenter – handler for mouseenter event
on_mouseleave – handler for mouseleave event
on_input – handler for input event
on_change – handler for change event
on_after – handler for after event
on_before – handler for before event
on_keydown – handler for keydown event
on_keyup – handler for keyup event
on_keypress – handler for keypress event
on_focus – handler for focus event
on_blur – handler for blur event
on_submit – handler for submit event
on_dragstart – handler for dragstart event
on_dragover – handler for dragover event
on_drop – handler for drop event
on_click__out – handler for click__out event
- class ActiveHCComponent¶
Inherits
ActiveBaseComponent
- Variables:
text – The text
- Parameters:
text (str, optional) – The text content to be displayed within the component.
- class ActiveDivComponent¶
Inherits
ActiveBaseComponent
- Parameters:
childs (list) – A list of child components to be associated with the parent.
- Variables:
components – The list of child components associated with the parent.