functions

LayoutToWrapper
Edited: Sunday 25 January 2026

LayoutToWrapper

Category: Utilities
File: layouts.go
Package: ui

Signature

1func LayoutToWrapper(r func(C, W) D) func(w W) W

Description

LayoutToWrapper converts a layout function into a wrapper that returns a widget builder.
This allows chaining layout functions as widget wrappers.

Example:

wrapper := LayoutToWrapper(someLayout)
widget := wrapper(Label("Wrapped"))

Advanced utility for creating reusable widget transformers.

Examples

LayoutToWrapper

1{
2	btn := &Clickable{}
3	wrapper := LayoutToWrapper(btn.Layout)
4	widget := wrapper(Label("Wrapped"))
5	_ = widget
6}

Example Output


This documentation is auto-generated. To update, run make docs

Backlinks