duck.html.components.linkยถ
Link component module.
Module Contentsยถ
Classesยถ
Link component. |
APIยถ
- class duck.html.components.link.Link(url: str = None, *args, **kwargs)[source]ยถ
Bases:
duck.html.components.InnerComponentLink component.
- Parameters:
url โ The linkโs URL.
text โ Text for the link.
Initialization
Initialize an HTML component.
- Parameters:
element โ The HTML element tag name (e.g., textarea, input, button). Can be None, but make sure element is returned by get_element method.
accept_inner_html โ Whether the HTML component accepts an inner body (e.g., inner-body-here).
inner_html โ Inner html to add to the HTML component. Defaults to None.
properties โ Dictionary for properties to initialize the component with.
props โ Just same as properties argument (added for simplicity).
style โ Dictionary for style to initialize the component with.
**kwargs โ Extra keyword arguments
- Raises:
HtmlComponentError โ If โelementโ is not a string or โinner_htmlโ is set but โaccept_inner_htmlโ is False.