Skip to content

Variable: groupMultiselect ​

ts
const 
groupMultiselect
: <
Value
>(
opts
,
) =>
Promise
<
Value
[] | typeof CANCEL_SYMBOL>;

Defined in: node_modules/.pnpm/@clack+prompts@1.9.0/node_modules/@clack/prompts/dist/index.d.mts:532

The groupMultiselect prompt extends the multiselect prompt to allow arranging distinct Multi-Selects, whilst keeping all of them interactive.

Type Parameters ​

Type Parameter

Value

Parameters ​

ParameterTypeDescription

opts

GroupMultiSelectOptions<Value>

The options for the group multiselect prompt

Returns ​

Promise<Value[] | typeof CANCEL_SYMBOL>

See ​

https://bomb.sh/docs/clack/packages/prompts/#group-multiselect

Example ​

ts
import { 
groupMultiselect
} from "@clack/prompts";
const
result
= await
groupMultiselect
({
message
: "Define your project",
options
: {
"Testing": [ {
value
: "Jest",
hint
: "JavaScript testing framework" },
{
value
: "Playwright",
hint
: "End-to-end testing" },
], "Language": [ {
value
: "js",
label
: "JavaScript",
hint
: "Dynamic typing" },
{
value
: "ts",
label
: "TypeScript",
hint
: "Static typing" },
], }, });

Released under the MIT License