Skip to content

Div

API

counterweight.elements.Div

type class-attribute instance-attribute

type: Literal['div'] = 'div'

style class-attribute instance-attribute

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

children class-attribute instance-attribute

children: Sequence[Component | AnyElement] = Field(
    default=()
)

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