Skip to content

Variable: multiline ​

ts
const 
multiline
: (
opts
) =>
Promise
<string | typeof CANCEL_SYMBOL>;

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

The multi-line prompt accepts multiple lines of text input. By default, pressing Enter twice submits the input.

Parameters ​

ParameterType

opts

MultiLineOptions

Returns ​

Promise<string | typeof CANCEL_SYMBOL>

See ​

https://bomb.sh/docs/clack/packages/prompts/#multi-line-text

Example ​

ts
import { 
multiline
} from "@clack/prompts";
const
bio
= await
multiline
({
message
: "Enter your bio",
placeholder
: "Tell us about yourself...",
showSubmit
: true,
});

基于 MIT 许可证发布