Skip to content

Text

API

counterweight.elements.Text

type class-attribute instance-attribute

type: Literal['text'] = 'text'

content instance-attribute

content: str | Sequence[Chunk]

style class-attribute instance-attribute

style: Style = Field(default=Style())

on_key class-attribute instance-attribute

on_key: Callable[[KeyPressed], AnyControl | None] | None = (
    None
)

on_mouse class-attribute instance-attribute

on_mouse: (
    Callable[[MouseEvent], AnyControl | None] | None
) = None

children property

cells cached property

cells: tuple[CellPaint, ...]