Text Widgets#
- class CodeWidget(code: Optional[str] = None, language: Optional[str] = None, line_numbers: bool = False, **kwargs)[source]#
Bases:
Block
A widget to display code with syntax highlighting if a language is supplied.
- Keyword Arguments:
code – the code to be displayed
language – the language of the code
line_numbers – if
True
, show line numbers
- class HTMLWidget(*args, **kwargs)[source]#
Bases:
TemplateWidget
A widget to display raw HTML.
- Parameters:
- class MarkdownWidget(*args, **kwargs)[source]#
Bases:
TemplateWidget
A widget to display markdown as HTML.
- Parameters:
- class StringBlock(text: str, **kwargs)[source]#
Bases:
Block
A basic widget that displays a string.
Deprecated since version 0.14.0: Use
wildewidgets.widgets.base.Block
directly instead. It works exactly likeStringBlock
- Parameters:
text – the text to display.
- class TagBlock(text: str, color: str = 'secondary', **kwargs)[source]#
Bases:
Block
A basic widget that displays a colored tag.
- Parameters:
text – the text to display.
color – the bootstrap color class.
- class TimeStamp(*blocks, tag: Optional[str] = None, name: Optional[str] = None, modifier: Optional[str] = None, css_class: Optional[str] = None, css_id: Optional[str] = None, empty: Optional[bool] = None, script: Optional[str] = None, attributes: Optional[Dict[str, str]] = None, data_attributes: Optional[Dict[str, str]] = None, aria_attributes: Optional[Dict[str, str]] = None)[source]#
Bases:
Block
A basic widget that displays a timestamp.
- Parameters:
text – the text to display.