Skip to main content
Module

x/cliffy/examples/prompt/select.ts

Command line framework for deno 🦕 Including Commandline-Interfaces, Prompts, CLI-Table, Arguments Parser and more...
Extremely Popular
Go to Latest
File
#!/usr/bin/env -S deno run --unstable
import { Select } from "../../prompt/select.ts";
const color: string = await Select.prompt({ message: "Pick a color", options: [ { name: "Red", value: "#ff0000" }, { name: "Green", value: "#00ff00", disabled: true }, { name: "Blue", value: "#0000ff" }, Select.separator("--------"), { name: "White", value: "#ffffff" }, { name: "Black", value: "#000000" }, ],});
console.log({ color });