functions
Centered| modified | Sunday 25 January 2026 |
|---|
Category: Layouts
File: layouts.go
Package: ui
1func Centered(w W) W
Centered centers a widget both vertically and horizontally in available space.
Uses flex layouts with SpaceAround to distribute space evenly.
Example:
centered := Centered(Label("I'm in the center!"))
Perfect for splash screens, modals, or centering single elements.
1{
2 centered := Centered(Label("I'm centered!"))
3 _ = centered
4}

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