You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/docs/clack/packages/prompts.mdx
+30-17Lines changed: 30 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -497,6 +497,8 @@ Options:
497
497
498
498
### Group Multiselect
499
499
500
+
The `groupMultiselect` prompt extends the [`multiselect`](#multiple-values) prompt to allow arranging distinct Multi-Selects, whilst keeping all of them interactive.
<fontcolor="#06989A">│</font> └ <fontcolor="#4E9A06">◼</font> Biome.js (Formatter and linter)
552
554
<fontcolor="#06989A">└</font></pre>
553
555
554
-
The `groupMultiselect` prompt supports two additional options:
555
-
-`groupSpacing`: An integer that specifies how many new lines to add between each group. This helps improve readability when you have many groups.
556
-
-`selectableGroups`: A boolean that determines whether top-level groups can be selected. When set to `false`, only individual items within groups can be selected.
556
+
Options:
557
+
558
+
-`message`: The message or question shown to the user above the input.
559
+
-`options`: Grouped options to display. Each key is a group label, and each value is an array of options.
560
+
-`initialValues`: The initially selected option(s).
561
+
-`maxItems`: The maximum number of items/options to display at once.
562
+
-`required`: When `true` at least one option must be selected (default: `true`).
563
+
-`cursorAt`: The value the cursor should be positioned at initially.
564
+
-`selectableGroups`: Whether entire groups can be selected at once (default: `true`).
565
+
-`groupSpacing`: Number of blank lines between groups (default: `0`).
566
+
- All [Common Options](#common-options)
557
567
558
568
### Group
559
569
560
-
The `group` function provides a convenient API for combining a series of questions.
561
-
Each question receives the `results` of previous answers.
562
-
The `group` function returns an object containing the result of every question.
570
+
The `group` utility provides a consistent way to combine a series of prompts, combining each answer into one object. Each prompt receives the results of all previously completed prompts, and are executed sequentially.
0 commit comments