class rich.rule.Rule(title: Union[str, rich.text.Text] = '', *, characters: str = '─', style: Union[str,] = 'rule.line', end: str = '\n', align: typing_extensions.Literal[left, center, right] = 'center')[source]

A console renderable to draw a horizontal rule (line).

  • title (Union[str, Text], optional) – Text to render in the rule. Defaults to “”.

  • characters (str, optional) – Character(s) used to draw the line. Defaults to “─”.

  • style (StyleType, optional) – Style of Rule. Defaults to “rule.line”.

  • end (str, optional) – Character at end of Rule. defaults to “\n”

  • align (str, optional) – How to align the title, one of “left”, “center”, or “right”. Defaults to “center”.