Texts Interface

class epyk.interfaces.components.CompTexts.Texts(ui)
absolute(text: str, size_notch: Optional[int] = None, top: Optional[Union[tuple, int, str]] = (50, '%'), left: Optional[Union[tuple, int, str]] = (50, '%'), bottom: Optional[Union[tuple, int, str]] = None, align: str = 'left', width: Optional[Union[tuple, int, str]] = ('auto', ''), height: Optional[Union[tuple, int, str]] = (None, 'px'), html_code: Optional[str] = None, options: Optional[dict] = None, profile: Optional[Union[bool, dict]] = None) Text
Tags:

Categories:

Usage:

:param text: Optional. The value to be displayed to the component
:param size_notch:
:param top: Optional. A tuple with the integer for the component's distance to the top of the page
:param left: Optional. A tuple with the integer for the component's distance to the left of the page
:param bottom: Optional. A tuple with the integer for the component's distance to the bottom of the page
:param align: Optional. The text-align property within this component
:param width: Optional. A tuple with the integer for the component width and its unit
:param height: Optional. A tuple with the integer for the component height and its unit
:param html_code: Optional. An identifier for this component (on both Python and Javascript side)
:param options: Optional. Specific Python options available for this component
:param profile: Optional. A flag to set the component performance storage
alert(text: Optional[str] = None, title: Optional[str] = None, icon: Optional[str] = None, category: Optional[str] = None, color: Optional[str] = None, width: Optional[Union[tuple, int, str]] = ('400', 'px'), height: Optional[Union[tuple, int, str]] = (None, 'px'), html_code: Optional[str] = None, helper: Optional[str] = None, options: Optional[Union[bool, dict]] = None, profile: Optional[Union[bool, dict]] = None)

Provide contextual feedback messages for typical user actions with the handful of available and flexible alert messages.

Tags:

Categories:

Usage:

page.ui.texts.highlights("Test content", title="Test", icon="fab fa-angellist")
page.ui.texts.highlights("Server configuration at: %s" % SERVER_PATH,  icon="fas fa-exclamation-triangle")

Underlying HTML Objects:

Related Pages:

Parameters:
  • text – Optional. The string value to be displayed in the component

  • title – Optional.

  • icon – Optional. The component icon content from font-awesome references

  • category – Optional. The type of the warning. Can be (primary, secondary, success, danger, warning, info, light, dark). Default danger

  • color – Optional. The font color in the component. Default inherit

  • width – Optional. A tuple with the integer for the component width and its unit

  • height – Optional. A tuple with the integer for the component height and its unit

  • html_code – Optional. An identifier for this component (on both Python and Javascript side)

  • helper – Optional. A tooltip helper

  • options – Optional. Specific Python options available for this component

  • profile – Optional. A flag to set the component performance storage

block(text: str = '', color: Optional[str] = None, align: str = 'left', width: Optional[Union[tuple, int, str]] = (100, '%'), height: Optional[Union[tuple, int, str]] = (None, 'px'), html_code: Optional[str] = None, tooltip: Optional[str] = None, options: Optional[dict] = None, helper: Optional[str] = None, profile: Optional[Union[bool, dict]] = None) Text

Add the HTML text component to the page.

Tags:

Categories:

Usage:

page.ui.text("this is a test")

Underlying HTML Objects:

Related Pages:

Templates:

Parameters:
  • text – Optional. The string value to be displayed in the component.

  • color – Optional. The color of the text.

  • align – Optional. The position of the icon in the line (left, right, center).

  • width – Optional. A tuple with the integer for the component width and its unit.

  • height – Optional. A tuple with the integer for the component height and its unit.

  • html_code – Optional. An identifier for this component (on both Python and Javascript side).

  • tooltip – Optional. A string with the value of the tooltip.

  • options – Optional. Specific Python options available for this component.

  • helper – Optional. The value to be displayed to the helper icon.

  • profile – Optional. A flag to set the component performance storage.

blockquote(text: Optional[str] = None, author: Optional[str] = None, color: Optional[str] = None, width: Optional[Union[tuple, int, str]] = (None, '%'), height: Optional[Union[tuple, int, str]] = (None, 'px'), html_code: Optional[str] = None, helper: Optional[str] = None, options: Optional[dict] = None, profile: Optional[Union[bool, dict]] = None) BlockQuote

The <blockquote> tag specifies a section that is quoted from another source. Browsers usually indent <blockquote> elements.

Tags:

Categories:

Usage:

page.ui.texts.blockquote("This is a code")

Underlying HTML Objects:

Related Pages:

Parameters:
  • text – Optional. The string value to be displayed in the component

  • author – Optional. The quote’s author

  • color – Optional. The font color in the component. Default inherit

  • width – Optional. A tuple with the integer for the component width and its unit

  • height – Optional. A tuple with the integer for the component height and its unit

  • html_code – Optional. An identifier for this component (on both Python and Javascript side)

  • helper – Optional. The value to be displayed to the helper icon

  • options – Optional. Specific Python options available for this component

  • profile – Optional. A flag to set the component performance storage

button(text: str, icon: Optional[str] = None, width: Optional[Union[tuple, int, str]] = ('auto', ''), tooltip: Optional[str] = None, height: Optional[Union[tuple, int, str]] = (None, 'px'), html_code: Optional[str] = None, profile: Optional[Union[bool, dict]] = None, options: Optional[Union[bool, dict]] = None)
Tags:

Categories:

Usage:

Templates:

Parameters:
  • text – Optional. The value to be displayed to the button

  • icon – Optional. The component icon content from font-awesome references

  • tooltip – Optional. A string with the value of the tooltip

  • width – Optional. A tuple with the integer for the component width and its unit

  • height – Optional. A tuple with the integer for the component height and its unit

  • html_code – Optional. An identifier for this component (on both Python and Javascript side)

  • profile – Optional. A flag to set the component performance storage

  • options – Optional. Specific Python options available for this component

code(text: str = '', language: str = 'python', color: Optional[str] = None, width: Optional[Union[tuple, int, str]] = (90, '%'), height: Optional[Union[tuple, int, str]] = (200, 'px'), html_code: Optional[str] = None, options: Optional[dict] = None, helper: Optional[str] = None, profile: Optional[Union[bool, dict]] = None)

Python Wrapper to the Bootstrap CODE Tag. This entry point compare to the ui.codes will be by default readonly.

Tags:

Categories:

Usage:

page.ui.texts.code("This is a code")

Underlying HTML Objects:

  • epyk.core.html.HtmlTextEditor.Code

Related Pages:

Parameters:
  • text – Optional. The string value to be displayed in the component

  • language – Optional. The language used in the code cell

  • width – Optional. A tuple with the integer for the component width and its unit

  • height – Optional. A tuple with the integer for the component height and its unit

  • color – Optional. The font color in the component. Default inherit

  • html_code – Optional. An identifier for this component (on both Python and Javascript side)

  • helper – Optional. The value to be displayed to the helper icon

  • options – Optional. Specific Python options available for this component

  • profile – Optional. A flag to set the component performance storage

col(text: str, label: str, align: str = 'left', width: Optional[Union[tuple, int, str]] = ('auto', ''), height: Optional[Union[tuple, int, str]] = (None, 'px'), html_code: Optional[str] = None, options: Optional[Union[bool, dict]] = None, profile: Optional[Union[bool, dict]] = None)
Tags:

Categories:

Usage:

:param text: Optional. The value to be displayed to the component
:param label: Optional. The text of label to be added to the component
:param align: Optional. The text-align property within this component
:param width: Optional. A tuple with the integer for the component width and its unit
:param height: Optional. A tuple with the integer for the component height and its unit
:param html_code: Optional. An identifier for this component (on both Python and Javascript side)
:param options: Optional. Specific Python options available for this component
:param profile: Optional. A flag to set the component performance storage
date(value=None, label: Optional[str] = None, icon: str = False, color: Optional[str] = None, width: Optional[Union[tuple, int, str]] = (None, 'px'), height: Optional[Union[tuple, int, str]] = (None, 'px'), html_code: Optional[str] = None, profile: Optional[Union[bool, dict]] = None, options: Optional[Union[bool, dict]] = None, helper: Optional[str] = None)

This component is based on the Jquery Date Picker object.

Tags:

Categories:

Usage:

page.ui.texts.date('2020-04-08', label="Date").included_dates(["2020-04-08", "2019-09-06"])

Underlying HTML Objects:

Related Pages:

Templates:

Parameters:
  • value – Optional. The value to be displayed to the time component. Default now

  • label – Optional. The text of label to be added to the component

  • icon – Optional. The component icon content from font-awesome references

  • color – Optional. The font color in the component. Default inherit

  • width – Optional. A tuple with the integer for the component width and its unit

  • height – Optional. A tuple with the integer for the component height and its unit

  • html_code – Optional. An identifier for this component (on both Python and Javascript side)

  • profile – Optional. A flag to set the component performance storage

  • options – Optional. Specific Python options available for this component

  • helper – Optional. A tooltip helper

fieldset(legend: str = '', width: Optional[Union[tuple, int, str]] = (100, '%'), height: Optional[Union[tuple, int, str]] = (None, 'px'), helper: Optional[str] = None, options: Optional[Union[bool, dict]] = None, profile: Optional[Union[bool, dict]] = None)

The <fieldset> tag is used to group related elements in a form. The <fieldset> tag draws a box around the related elements.

Tags:

Categories:

Usage:

page.ui.texts.fieldset("legend")

Underlying HTML Objects:

Related Pages:

Parameters:
  • legend – Optional. The legend value

  • width – Optional. A tuple with the integer for the component width and its unit

  • height – Optional. A tuple with the integer for the component height and its unit

  • options – Optional. Specific Python options available for this component

  • helper – Optional. The value to be displayed to the helper icon

  • profile – Optional. A flag to set the component performance storage

formula(text: Optional[str] = None, width: Optional[Union[tuple, int, str]] = (100, '%'), height: Optional[Union[tuple, int, str]] = (None, 'px'), html_code: Optional[str] = None, color: Optional[str] = None, helper: Optional[str] = None, align: str = 'left', options: Optional[dict] = None, profile: Optional[Union[bool, dict]] = None) Formula

Interface to the mathjax Formulas object.

Tags:

Categories:

Usage:

page.ui.texts.formula("$$x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$$", helper="This is a formula")

Underlying HTML Objects:

Related Pages:

Parameters:
  • text – Optional. The string value to be displayed in the component

  • width – Optional. A tuple with the integer for the component width and its unit

  • height – Optional. A tuple with the integer for the component height and its unit

  • color – Optional. The font color in the component. Default inherit

  • html_code – Optional. An identifier for this component (on both Python and Javascript side)

  • helper – Optional. The value to be displayed to the helper icon

  • align – Optional. The text-align property within this component

  • options – Optional. Specific Python options available for this component

  • profile – Optional. A flag to set the component performance storage

highlights(text: Optional[str] = None, title: Optional[str] = None, icon: Optional[str] = None, type: str = 'danger', color: Optional[str] = None, width: Optional[Union[tuple, int, str]] = ('auto', ''), height: Optional[Union[tuple, int, str]] = (None, 'px'), html_code: Optional[str] = None, helper: Optional[str] = None, options: Optional[dict] = None, profile: Optional[Union[bool, dict]] = None) Highlights

Provide contextual feedback messages for typical user actions with the handful of available and flexible alert messages.

Tags:

Categories:

Usage:

page.ui.texts.highlights("Test content", title="Test", icon="fab fa-angellist")
page.ui.texts.highlights("Server configuration at: %s" % SERVER_PATH, icon="fas fa-exclamation-triangle")

Underlying HTML Objects:

Related Pages:

Parameters:
  • text – Optional. The string value to be displayed in the component

  • title – Optional.

  • icon – Optional. The component icon content from font-awesome references

  • type – Optional. The type of the warning. Can be (primary, secondary, success, danger, warning, info, light, dark). Default danger

  • color – Optional. The font color in the component. Default inherit

  • width – Optional. A tuple with the integer for the component width and its unit

  • height – Optional. A tuple with the integer for the component height and its unit

  • html_code – Optional. An identifier for this component (on both Python and Javascript side)

  • helper – Optional. A tooltip helper

  • profile – Optional. A flag to set the component performance storage

  • options – Optional. Specific Python options available for this component

label(text: str = '', color: Optional[str] = None, align: str = 'center', width: Optional[Union[tuple, int, str]] = (140, 'px'), height: Optional[Union[tuple, int, str]] = ('auto', ''), html_code: Optional[str] = None, tooltip: str = '', profile: Optional[Union[bool, dict]] = None, options: Optional[dict] = None) Label

The <label> tag defines a label for a <button>, <input>, <meter>, <output>, <progress>, <select>, or <textarea> element…

The for attribute of the <label> tag should be equal to the id attribute of the related element to bind them together.

Tags:

Categories:

Usage:

page.ui.texts.label("Test")
page.ui.texts.label("this is a test", color="red")

Underlying HTML Objects:

Related Pages:

Parameters:
  • text – Optional. The string value to be displayed in the component

  • color – Optional. The color of the text

  • align – Optional. The position of the icon in the line (left, right, center)

  • width – Optional. A tuple with the integer for the component width and its unit

  • height – Optional. A tuple with the integer for the component height and its unit

  • html_code – Optional. An identifier for this component (on both Python and Javascript side)

  • tooltip – Optional. A string with the value of the tooltip

  • profile – Optional. A flag to set the component performance storage

  • options – Optional. Specific Python options available for this component

note(text: Optional[str] = None, title: str = '', icon: Optional[str] = None, category: str = 'success', color: Optional[str] = None, width: Optional[Union[tuple, int, str]] = (None, '%'), height: Optional[Union[tuple, int, str]] = (None, 'px'), html_code: Optional[str] = None, helper: Optional[str] = None, options: Optional[Union[bool, dict]] = None, profile: Optional[Union[bool, dict]] = None) Highlights

Provide contextual feedback messages for typical user actions with the handful of available and flexible alert messages.

Tags:

Categories:

Usage:

page.ui.texts.highlights("Test content", title="Test", icon="fab fa-angellist")

Underlying HTML Objects:

Related Pages:

Templates:

Parameters:
  • text – Optional. The string value to be displayed in the component

  • title

  • icon – Optional. A string with the value of the icon to display from font-awesome

  • category – Optional. The type of the warning. Can be (primary, secondary, success, danger, warning, info, light, dark). Default danger

  • color – Optional. The font color in the component. Default inherit

  • width – Optional. A tuple with the integer for the component width and its unit

  • height – Optional. A tuple with the integer for the component height and its unit

  • html_code – Optional. An identifier for this component (on both Python and Javascript side)

  • helper – Optional. The value to be displayed to the helper icon

  • options – Optional. Specific Python options available for this component

  • profile – Optional. A flag to set the component performance storage

number(number: int = 0, title: Optional[str] = None, label: Optional[str] = None, icon: Optional[str] = None, color: Optional[str] = None, align: str = 'left', tooltip: str = '', html_code=None, options: Optional[Union[bool, dict]] = None, helper: Optional[str] = None, width: Optional[Union[tuple, int, str]] = (150, 'px'), profile: Optional[Union[bool, dict]] = None)
Tags:

Categories:

Usage:

page.ui.texts.number(289839898, label="test", helper="Ok", icon="fas fa-align-center")

Underlying HTML Objects:

Related Pages:

Parameters:
  • number – Optional. The value to be displayed to the component. Default 0

  • title – Optional. The text title

  • label – Optional. The text of label to be added to the component

  • icon – Optional. A string with the value of the icon to display from font-awesome

  • color – Optional. The font color in the component. Default inherit

  • align – Optional. The text-align property within this component

  • width – Optional. A tuple with the integer for the component width and its unit

  • tooltip – Optional. A string with the value of the tooltip

  • html_code – Optional. An identifier for this component (on both Python and Javascript side)

  • options – Optional. Specific Python options available for this component

  • helper – Optional. The value to be displayed to the helper icon

  • profile – Optional. A flag to set the component performance storage

paragraph(text: str = '', color: Optional[str] = None, background_color: Optional[str] = None, border: bool = False, width: Optional[Union[tuple, int, str]] = (100, '%'), height: Optional[Union[tuple, int, str]] = (None, 'px'), html_code: Optional[str] = None, encoding: str = 'UTF-8', helper: Optional[str] = None, options: Optional[dict] = None, profile: Optional[Union[bool, dict]] = None) Paragraph

Python Wrapper to the HTML P Tag.

Tags:

Categories:

Usage:

page.ui.texts.paragraph("This is a paragraph", helper="Paragraph helper")

Underlying HTML Objects:

Related Pages:

Templates:

Parameters:
  • text – Optional. The string value to be displayed in the component

  • color – Optional. The font color in the component. Default inherit

  • background_color

  • border

  • width – Optional. A tuple with the integer for the component width and its unit

  • height – Optional. A tuple with the integer for the component height and its unit

  • html_code – Optional. An identifier for this component (on both Python and Javascript side)

  • encoding – Optional.

  • helper – Optional. The value to be displayed to the helper icon

  • options – Optional. Specific Python options available for this component

  • profile – Optional. A flag to set the component performance storage

preformat(text: Optional[str] = None, color: Optional[str] = None, width: Optional[Union[tuple, int, str]] = (90, '%'), height: Optional[Union[tuple, int, str]] = (None, 'px'), html_code: Optional[str] = None, options: Optional[dict] = None, helper: Optional[str] = None, profile: Optional[Union[bool, dict]] = None) Pre

Preformatted text: The <pre> tag defines preformatted text. Text in a <pre> element is displayed in a fixed-width font (usually Courier), and it preserves both spaces and line breaks.

Tags:

Categories:

Usage:

page.ui.texts.preformat("This is a pre formatted text")

Underlying HTML Objects:

Related Pages:

Parameters:
  • text – Optional. The string value to be displayed in the component

  • color – Optional. The font color in the component. Default inherit

  • width – Optional. A tuple with the integer for the component width and its unit

  • height – Optional. A tuple with the integer for the component height and its unit

  • html_code – Optional. An identifier for this component (on both Python and Javascript side)

  • helper – Optional. The value to be displayed to the helper icon

  • options – Optional. Specific Python options available for this component

  • profile – Optional. A flag to set the component performance storage

property references: TextReferences

More custom toggles icons.

span(text: str = '', color: Optional[str] = None, align: str = 'center', width: Optional[Union[tuple, int, str]] = None, height: Optional[Union[tuple, int, str]] = None, html_code: Optional[str] = None, tooltip: Optional[str] = None, options: Optional[dict] = None, profile: Optional[Union[bool, dict]] = None) Span

The <span> tag is used to group inline-elements in a document.

The <span> tag provides no visual change by itself.

The <span> tag provides a way to add a hook to a part of a text or a part of a document.

Tags:

Categories:

Usage:

page.ui.texts.span("Test")

span = page.ui.texts.span("youpi")
span.mouse([
  span.dom.css("color", "red"),
  span.dom.css("cursor", "pointer").r],
  span.dom.css("color", "blue").r)

Underlying HTML Objects:

Related Pages:

Parameters:
  • text – Optional. The string value to be displayed in the component

  • color – Optional. The color of the text

  • align – Optional. The position of the icon in the line (left, right, center)

  • width – Optional. A tuple with the integer for the component width and its unit

  • height – Optional. A tuple with the integer for the component height and its unit

  • html_code – Optional. An identifier for this component (on both Python and Javascript side)

  • tooltip – Optional. A string with the value of the tooltip

  • profile – Optional. A flag to set the component performance storage

  • options – Optional. Specific Python options available for this component

text(text: str = '', color: Optional[str] = None, align: str = 'left', width: Optional[Union[tuple, int, str]] = ('auto', ''), height: Optional[Union[tuple, int, str]] = (None, 'px'), html_code: Optional[str] = None, tooltip: Optional[str] = None, options: Optional[dict] = None, helper: Optional[str] = None, profile: Optional[Union[bool, dict]] = None) Text

Add the HTML text component to the page.

Usage:

page.ui.text("this is a test")

txt = page.ui.text('''
  This text is ___really important___.
  This text is __*really important*__.
  This text is **_really important_**.
  This is really***very***important text.
''')
txt.options.markdown = True

Underlying HTML Objects:

Related Pages:

Templates:

Parameters:
  • text – The string value to be displayed in the component.

  • color – Optional. The color of the text.

  • align – Optional. The position of the icon in the line (left, right, center).

  • width – Optional. A tuple with the integer for the component width and its unit.

  • height – Optional. A tuple with the integer for the component height and its unit.

  • html_code – Optional. An identifier for this component (on both Python and Javascript side).

  • tooltip – Optional. A string with the value of the tooltip.

  • options – Optional. The component options.

  • helper – Optional. A tooltip helper.

  • profile – A flag to set the component performance storage.

title(text: Union[str, dict] = '', level=None, name: Optional[str] = None, contents=None, color=None, picture: Optional[str] = None, icon: Optional[str] = None, top: int = 5, html_code: Optional[str] = None, width: Optional[Union[tuple, int, str]] = ('auto', ''), height: Optional[Union[tuple, int, str]] = (None, 'px'), align: Optional[str] = None, options: Optional[Union[bool, dict]] = None, profile: Optional[Union[bool, dict]] = None)

Add a title.

Tags:

Categories:

Usage:

page.ui.title("Test")
page.ui.title("Test", level=2)

Underlying HTML Objects:

Related Pages:

Parameters:
  • text – Optional. The value to be displayed to the component.

  • level

  • name

  • contents

  • color – Optional. The font color in the component. Default inherit.

  • picture

  • icon – Optional. A string with the value of the icon to display from font-awesome

  • top – Optional. The margin top in pixel

  • html_code – Optional. An identifier for this component (on both Python and Javascript side)

  • width – Optional. A tuple with the integer for the component width and its unit

  • height – Optional. A tuple with the integer for the component height and its unit

  • align – Optional. The text-align property within this component

  • options – Optional. Specific Python options available for this component

  • profile – Optional. A flag to set the component performance storage

up_down(record=None, components=None, color=None, label: Optional[str] = None, width: Optional[Union[tuple, int, str]] = (100, '%'), height: Optional[Union[tuple, int, str]] = (330, 'px'), options: Optional[Union[bool, dict]] = None, helper: Optional[str] = None, profile: Optional[Union[bool, dict]] = None)

Up and down Text component.

Tags:

Categories:

Usage:

page.ui.texts.up_down({'previous': 240885, 'value': 240985})

Underlying HTML Objects:

  • epyk.core.html.HtmlText.UpDown

Related Pages:

Parameters:
  • record – Optional. The component inputs

  • components – List of HTML component to be added

  • color – Optional. The font color in the component. Default inherit

  • label – Optional.

  • width – Optional. A tuple with the integer for the component width and its unit

  • height – Optional. A tuple with the integer for the component height and its unit

  • helper – Optional. The value to be displayed to the helper icon

  • options – Optional. Specific Python options available for this component

  • profile – Optional. A flag to set the component performance storage