meerkat.interactive.app.src.lib.component.core.Header
meerkat.interactive.app.src.lib.component.core.Header¶
- class Header(text: str, *, classes: str = '', body: str, base_url: Optional[str] = None, breaks: bool = True, gfm: bool = True, header_ids: bool = True, header_prefix: str = '', lang_prefix: str = 'language-', mangle: bool = True, pedantic: bool = False, sanitize: bool = False, silent: bool = False, smartypants: bool = False, xhtml: bool = False, **kwargs)[source]¶
Display header text.
Use this component for the main header of a section. This will place the text in an <h2> tag.
- __init__(text: str, *, classes: str = '', **kwargs)[source]¶
Render markdown with GitHub Flavored Markdown (GFM) syntax.
The implementation of this component uses the marked.js library (https://github.com/markedjs/marked). Argument descriptions below are taken directly from the marked.js documentation.
- Parameters
body – The markdown data to render.
classes – The Tailwind classes to apply to the component, see @tailwindcss/typography for the classes that are specifically available to style this component.
base_url – The base URL to use for relative links.
breaks – If true, add <br> on a single line break (copies GitHub behavior on comments, but not on rendered markdown files). Requires gfm be true.
gfm – If true, use approved GitHub Flavored Markdown (GFM) specification.
header_ids – If true, include an id attribute when emitting headings (h1, h2, h3, etc).
header_prefix – A string to prefix the id attribute when emitting headings (h1, h2, h3, etc).
lang_prefix – A string to prefix the className in a <code> block. Useful for syntax highlighting.
mangle – If true, autolinked email address is escaped with HTML character references.
pedantic – If true, conform to the original markdown.pl as much as possible. Don’t fix original markdown bugs or behavior. Turns off and overrides gfm.
sanitize – If true, sanitize the HTML passed into markdownString with the sanitizer function.
silent – If true, the parser does not throw any exception.
smartypants – If true, use “smart” typographic punctuation for things like quotes and dashes.
xhtml – If true, emit self-closing HTML tags for void elements (<br/>, <img/>, etc.) with a “/” as required by XHTML.
Methods
__init__
(text, *[, classes])Render markdown with GitHub Flavored Markdown (GFM) syntax.
append
(other)construct
([_fields_set])Creates a new model setting __dict__ and __fields_set__ from trusted or pre-validated data.
copy
(*[, include, exclude, update, deep])Duplicate a model, optionally choose which fields to include, exclude and change.
dict
(*[, include, exclude, by_alias, ...])Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.
from_id
(id)from_orm
(obj)get_components
()json
(*[, include, exclude, by_alias, ...])Generate a JSON representation of the model, include and exclude arguments as per dict().
make_header
(v)parse_file
(path, *[, content_type, ...])parse_obj
(obj)parse_raw
(b, *[, content_type, encoding, ...])prepend_meerkat_id_prefix
(id)schema
([by_alias, ref_template])schema_json
(*[, by_alias, ref_template])update_forward_refs
(**localns)Try to update ForwardRefs on fields based on this Model, globalns and localns.
validate
(value)Attributes
alias
component_name
event_names
events
frontend
Returns a Pydantic model that can be should be sent to the frontend.
frontend_alias
id
identifiable_group
library
namespace
path
prop_bindings
prop_names
props
slots
slottable
virtual_props
Props, and all events (as_*) as props.
wrapper_import_style