# tui/layer-set Set per-panel display attributes. Honored by both the ANSI cell-blit path and the GL pixel path. ## Syntax
[tui/layer-set ?panel-id :opacity 0.5 :z 3 :visible false]
If the first argument is a number, it is the target panel id. Otherwise the calling panel (`tui/self`) is targeted. ## Keywords - `:opacity` (number, 0.0–1.0) — alpha multiplier applied to all GL pixel commands published by this panel. ANSI ignores opacity but records it. - `:z` (integer) — z-order hint. Stored on the panel for use by future layered composition; not yet used to reorder draw execution. - `:visible` (bool) — when `false`, the panel's cell grid and pixel buffer are both skipped this frame. Useful for hiding overlays or animating reveals. ## Returns `true` on success, `false` if the target panel cannot be resolved. ## Example
# Fade a side panel to half opacity
[tui/layer-set [tui/find-panel "sidebar"] :opacity 0.5]

# Hide the calling panel
[tui/layer-set :visible false]
## See Also `capabilities`, `tui/self`, `tui/find-panel`