1use zen_console_input::ZenConsoleInput;
2
3fn main() {
4 let zci = ZenConsoleInput::new();
5
6 let name = zci.input().message("Enter your name: ").get_input();
8 println!("Hello, {}!", name);
9
10 let age: u32 = zci
12 .input()
13 .message("Enter your age [19]: ")
14 .default("19")
15 .get_parsed_input();
16 println!("You are {} years old.", age);
17
18 let bio = zci
20 .input()
21 .message("Enter your bio")
22 .multiline()
23 .get_input();
24 println!("Your bio:\n{}", bio);
25
26 let favorite_color = zci
28 .selection()
29 .message("Choose your favorite color")
30 .options(vec![
31 "Red".to_string(),
32 "Green".to_string(),
33 "Blue".to_string(),
34 ])
35 .get_selection();
36 println!("Your favorite color is {}", favorite_color);
37
38 let password = zci
40 .password()
41 .message("Enter your password: ")
42 .get_password();
43 println!("Your password is {} characters long", password.len());
44}