This library provides OCaml bindings to the TinyFileDialogs C library.
opam install tinyfiledialogs
Open Tinyfiledialogs
and call functions like:
input_box
message_box
save_file_dialog
open_file_dialog
select_folder_dialog
color_chooser
beep
notify_popup
You can also configure global variables:
tinyfd_verbose
tinyfd_silent
tinyfd_allowCursesDialogs
tinyfd_forceConsole
open Tinyfiledialogs
let () =
match input_box ~title:"Name" ~message:"Enter your name:" ~default_input:"" with
| None -> exit 0
| Some name -> print_endline ("Hello " ^ name ^ "!")