File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -110,6 +110,28 @@ const additionalTools = await multiselect({
110110});
111111```
112112
113+ It is also possible to select multiple items arranged into hierarchy by using ` groupMultiselect ` :
114+
115+ ``` js
116+ import { groupMultiselect } from ' @clack/prompts' ;
117+
118+ const basket = await groupMultiselect ({
119+ message: ' Select your favorite fruits and vegetables:' ,
120+ options: {
121+ fruits: [
122+ { value: ' apple' , label: ' apple' },
123+ { value: ' banana' , label: ' banana' },
124+ { value: ' cherry' , label: ' cherry' },
125+ ],
126+ vegetables: [
127+ { value: ' carrot' , label: ' carrot' },
128+ { value: ' spinach' , label: ' spinach' },
129+ { value: ' potato' , label: ' potato' },
130+ ]
131+ }
132+ });
133+ ```
134+
113135### Spinner
114136
115137The spinner component surfaces a pending action, such as a long-running download or dependency installation.
You can’t perform that action at this time.
0 commit comments