Skip to main content

Basic Usage Examples

This page contains practical examples of creating TUI applications with Ziva. All examples are ready to run and demonstrate the main features of the library.

Example 1: Simple Confirmation

Basic example with a confirmation task:

Example 2: List Selection

Example with single option selection from a list:

Example 3: Multiple Selection

Example with selecting multiple components:

Example 4: Input with Validation

Example of collecting user data with validation:

Example 5: Function Task

Example of executing a long-running operation:

Usage Tips

1. Task Grouping

Logically group related tasks:

2. Cancellation Handling

3. Configuration Saving

See Also