[READ-ONLY] Mirror of https://github.com/bombshell-dev/docs. bomb.sh/docs
0

Configure Feed

Select the types of activity you want to include in your feed.

docs(clack): sync prompts and core docs for 1.6.0 / 1.4.2 (#55)

authored by

paul valladares and committed by
GitHub
(Jun 19, 2026, 12:52 PM -0500) 19897d7f 219f360e

+25 -3
+1
src/content/docs/clack/basics/getting-started.mdx
··· 88 88 Clack provides several high-level components that make it easy to build interactive CLIs: 89 89 90 90 - `text()` - For text input with validation 91 + - `multiline()` - For multi-line text input 91 92 - `password()` - For secure password input with masking 92 93 - `select()` - For selection menus 93 94 - `selectKey()` - For choosing an option by pressing its key
+2 -1
src/content/docs/clack/packages/core.mdx
··· 177 177 - Character masking 178 178 - Validation support 179 179 - `clearOnError` option to reset on validation failure 180 + - Empty submit resolves to `""`, matching `TextPrompt` and `Promise<string | symbol>` (v1.4.2) 180 181 181 182 6. **MultiSelectPrompt**: For multiple selections 182 183 - Checkbox interface ··· 201 202 - Optional `separator` override for display 202 203 - `minDate` / `maxDate` bounds and `DateParts` segment values 203 204 204 - 10. **Multi-line input**: v1.2.0 does not include a dedicated multi-line prompt in `@clack/core` or `@clack/prompts`. Use `text()` for a single line, an external editor or stdin for paragraphs, or extend `Prompt` for custom multi-line TTY behavior. 205 + 10. **Multi-line input**: Use [`multiline()`](/docs/clack/packages/prompts#multi-line-text) from `@clack/prompts` for multi-line text entry (since v1.3.0). `@clack/core` provides the underlying prompt primitive; extend `Prompt` directly only when you need custom multi-line TTY behavior. 205 206 206 207 ## Layout utilities 207 208
+22 -2
src/content/docs/clack/packages/prompts.mdx
··· 165 165 - `mask`: Character to use for masking input. Default: `'▪/•'`. 166 166 - `validate`: A function or a [Standard Schema](https://github.com/standard-schema/standard-schema) that validates user input. If a custom function is given, you should return a `string` or `Error` to show as a validation error, or `undefined` to accept the result. 167 167 - `clearOnError`: When enabled it causes the input to be cleared if/when validation fails. Default: `false`. 168 + - Submitting with no input resolves to `""`, matching `text()` and the documented `Promise<string | symbol>` return type (v1.4.2). 168 169 - All [Common Options](#common-options) 169 170 170 171 Common options (`withGuide`, `signal`, `input`, `output`) are also supported. 171 172 172 173 ### Multi-line Text 173 174 174 - The multi-line component accepts multiple lines of text input. By default, pressing Enter twice submits the input. 175 + The multi-line component accepts multiple lines of text input. By default, pressing Enter twice **at the end of the input** submits; a double Enter elsewhere in the text adds a blank line instead (v1.4.2). 175 176 176 177 ```ts twoslash 177 178 import { multiline } from '@clack/prompts'; ··· 191 192 192 193 Options: 193 194 194 - - `showSubmit`: When enabled it shows a `[ submit ]` button that can be focused with tab. By default, pressing Enter twice submits the input. Default: `false`. 195 + - `showSubmit`: When enabled it shows a `[ submit ]` button that can be focused with tab. By default, pressing Enter twice at the end of the input submits. Default: `false`. 196 + - `initialValue`: Pre-fills editable content when the prompt opens; the cursor is placed at the end (v1.4.2). See also [Text Options](#text-input). 195 197 - All [Text Options](#text-input) 196 198 197 199 ### Selection 198 200 201 + `select`, `multiselect`, and `groupMultiselect` show persistent keyboard hint footers while active (v1.6.0), matching `autocomplete`. There is no option to disable them. 202 + 199 203 #### Simple value 200 204 201 205 ```ts twoslash ··· 217 221 <font color="#06989A">│</font> <font color="#4E9A06">●</font> Next.js (React framework) 218 222 <font color="#06989A">│</font> ○ Astro (Content-focused) 219 223 <font color="#06989A">│</font> ○ SvelteKit (Compile-time framework) 224 + <font color="#06989A">│</font> <font color="#AAAAAA">↑/↓ to navigate • Enter: confirm</font> 220 225 <font color="#06989A">└</font></pre> 221 226 222 227 #### Complex value ··· 290 295 <font color="#06989A">│</font> <font color="#4E9A06">◼</font> Next.js (React framework) 291 296 <font color="#06989A">│</font> <font color="#06989A">◻</font> Astro (Content-focused) 292 297 <font color="#06989A">│</font> ◻ SvelteKit (Compile-time framework) 298 + <font color="#06989A">│</font> <font color="#AAAAAA">↑/↓ to navigate • Space: select • Enter: confirm</font> 293 299 <font color="#06989A">└</font></pre> 294 300 295 301 ### Select by key ··· 588 594 <font color="#06989A">│</font> │ ◻ Prettier (Code formatter) 589 595 <font color="#06989A">│</font> │ ◻ ESLint (Linter) 590 596 <font color="#06989A">│</font> └ <font color="#4E9A06">◼</font> Biome.js (Formatter and linter) 597 + <font color="#06989A">│</font> <font color="#AAAAAA">↑/↓ to navigate • Space: select • Enter: confirm</font> 591 598 <font color="#06989A">└</font></pre> 592 599 593 600 Options: ··· 916 923 <font color="#555753">│</font> You can edit the file src/index.jsx <font color="#555753">│</font> 917 924 <font color="#555753">│</font> <font color="#555753">│</font> 918 925 <font color="#555753">├───────────────────────────────────────╯</font></pre> 926 + 927 + <Aside type="note">As of v1.6.0, body lines in `note()` are no longer dimmed by default. To restore the previous styling, pass a `format` function—for example, using `styleText` from `node:util`:</Aside> 928 + 929 + ```ts twoslash 930 + import { note } from '@clack/prompts'; 931 + import { styleText } from 'node:util'; 932 + 933 + note( 934 + 'You can edit the file src/index.jsx', 935 + 'Next steps.', 936 + { format: (text) => styleText('dim', text) } 937 + ); 938 + ``` 919 939 920 940 The second parameter (the title) is optional. You can also provide a format function to customize how each line is displayed: 921 941