Popup (Clear) Widget Example

Demonstrates how to render opaque overlays on top of content.

Terminal renders are additive. If you draw a new widget over an old one, the background colors might mix if not handled correctly. The Clear widget resets the area to default (usually transparent/black) to ensure a clean canvas for popups.

Features Demonstrated

Hotkeys

Usage

ruby examples/widget_popup_demo/app.rb

Learning Outcomes

Use this example if you need to… - Create a modal dialog (Confirm, Alert, Form). - Implement a dropdown menu that overlays other content. - Fix visual artifacts where old text shows through new widgets.

Demo