Skip to content

Layouts

MorphUI wraps all standard Kivy layout classes with theming and declarative composition support. All layouts accept child widgets as positional constructor arguments.


Layout Description
Anchor Layout Positions children at anchor points
Box Layout Horizontal or vertical linear arrangement
Container Prebuilt icon/label container helpers
Float Layout Absolute positioning with pos_hint
Grid Layout Grid arrangement by rows and columns
Recycle Box Layout Virtualized box layout for large lists
Recycle Grid Layout Virtualized grid layout for large collections
Recycle View Efficient scrollable list using view recycling
Relative Layout Positioning relative to parent
Screen Manager Multiple screens with transition support
Scroll View Scrollable content container
Stack Layout Wrapping stack arrangement
Widget Themed base widget

Declarative usage

All MorphUI layouts support the declarative pattern — pass children as positional arguments:

MorphBoxLayout(
    MorphLabel(text="Hello"),
    MorphButton(text="OK"),
    orientation='horizontal',
    spacing=8,
)