Login Form Example

Demonstrates how to create a modal overlay for user input.

Many applications need to block interaction with the main UI while collecting specific information, like a login prompt or confirmation dialog. Managing the z-index and input focus for these overlays can be tricky.

This example solves this by using the Overlay widget to stack a centered popup on top of a base layer, conditionally rendering the popup based on state.

Features Demonstrated

Hotkeys

Form Mode

Popup Mode

Usage

ruby examples/app_login_form/app.rb

Learning Outcomes

Use this example if you need to… - Create a modal dialog or popup. - Center a widget on the screen (vertically and horizontally). - Implement a simple text input field with cursor management. - layer widgets using the Overlay widget.