Skip to content

PlantUML Layouts

PlantUML layout helpers live in c4.contrib.plantuml and render as C4-PlantUML Lay_* macros.

c4.contrib.plantuml.Layout

Bases: BaseDiagramElement, ABC

Represents a relative layout constraint between two elements.

__init__

__init__(
    from_element: Element, to_element: Element
) -> None

Parameters:

Name Type Description Default
from_element Element

The element to be positioned.

required
to_element Element

The element to position relative to.

required

Raises:

Type Description
ValueError

If layout_type is not provided and the subclass does not define a class-level layout_type.

c4.contrib.plantuml.LayD

Bases: Layout

Positions from_element below to_element using shorthand 'Lay_D' layout.

c4.contrib.plantuml.LayDown

Bases: Layout

Positions from_element explicitly below to_element using 'Lay_Down' layout.

c4.contrib.plantuml.LayU

Bases: Layout

Positions from_element above to_element using shorthand 'Lay_U' layout.

c4.contrib.plantuml.LayUp

Bases: Layout

Positions from_element explicitly above to_element using 'Lay_Up' layout.

c4.contrib.plantuml.LayR

Bases: Layout

Positions from_element to the right of to_element using shorthand 'Lay_R' layout.

c4.contrib.plantuml.LayRight

Bases: Layout

Positions from_element explicitly to the right of to_element using 'Lay_Right' layout.

c4.contrib.plantuml.LayL

Bases: Layout

Positions from_element to the left of to_element using shorthand 'Lay_L' layout.

c4.contrib.plantuml.LayLeft

Bases: Layout

Positions from_element explicitly to the left of to_element using 'Lay_Left' layout.