---
url: /reference/api/logger/Namespace.prompts.md
---
# prompts

## Interfaces

[AutocompleteMultiSelectOptions](prompts.Interface.AutocompleteMultiSelectOptions.md)

Options for the [autocompleteMultiselect](prompts.Variable.autocompleteMultiselect.md) prompt

[AutocompleteOptions](prompts.Interface.AutocompleteOptions.md)

‐

[BoxOptions](prompts.Interface.BoxOptions.md)

Options for the [box](prompts.Variable.box.md) prompt.

[ClackSettings](prompts.Interface.ClackSettings.md)

‐

[CommonOptions](prompts.Interface.CommonOptions.md)

‐

[ConfirmOptions](prompts.Interface.ConfirmOptions.md)

Options for the [confirm](prompts.Variable.confirm.md) prompt.

[DateOptions](prompts.Interface.DateOptions.md)

Options for the [date](prompts.Variable.date.md) prompt.

[GroupMultiSelectOptions](prompts.Interface.GroupMultiSelectOptions.md)

Options for the [groupMultiselect](prompts.Variable.groupMultiselect.md) prompt.

[LimitOptionsParams](prompts.Interface.LimitOptionsParams.md)

Options for the [limitOptions](prompts.Variable.limitOptions.md) function.

[LogMessageOptions](prompts.Interface.LogMessageOptions.md)

‐

[MultiLineOptions](prompts.Interface.MultiLineOptions.md)

Options for the [multiline](prompts.Variable.multiline.md) prompt

[MultiSelectOptions](prompts.Interface.MultiSelectOptions.md)

‐

[NoteOptions](prompts.Interface.NoteOptions.md)

‐

[PasswordOptions](prompts.Interface.PasswordOptions.md)

Options for the [password](prompts.Variable.password.md) prompt

[PathOptions](prompts.Interface.PathOptions.md)

Options for the [path](prompts.Variable.path.md) prompt.

[ProgressOptions](prompts.Interface.ProgressOptions.md)

‐

[ProgressResult](prompts.Interface.ProgressResult.md)

‐

[PromptGroupOptions](prompts.Interface.PromptGroupOptions.md)

Options for the [group](prompts.Variable.group.md) utility.

[SelectKeyOptions](prompts.Interface.SelectKeyOptions.md)

‐

[SelectOptions](prompts.Interface.SelectOptions.md)

‐

[SpinnerOptions](prompts.Interface.SpinnerOptions.md)

‐

[SpinnerResult](prompts.Interface.SpinnerResult.md)

‐

[TaskLogCompletionOptions](prompts.Interface.TaskLogCompletionOptions.md)

‐

[TaskLogMessageOptions](prompts.Interface.TaskLogMessageOptions.md)

‐

[TaskLogOptions](prompts.Interface.TaskLogOptions.md)

‐

[TextOptions](prompts.Interface.TextOptions.md)

Options for the [text](prompts.Variable.text.md) prompt

## Type Aliases

[BoxAlignment](prompts.TypeAlias.BoxAlignment.md)

Alignment for content or titles within the box.

[DateFormat](prompts.TypeAlias.DateFormat.md)

‐

[Option](prompts.TypeAlias.Option.md)

‐

[PromptGroup](prompts.TypeAlias.PromptGroup.md)

A group of prompts to be displayed sequentially, with each prompt receiving
the results of all previous prompts in the group.

[PromptGroupAwaitedReturn](prompts.TypeAlias.PromptGroupAwaitedReturn.md)

The return type of a [PromptGroup](prompts.TypeAlias.PromptGroup.md).
Resolves all prompt results, excluding the cancel symbol.

[Task](prompts.TypeAlias.Task.md)

‐

## Variables

[autocomplete](prompts.Variable.autocomplete.md)

The `autocomplete` prompt combines a text input with a searchable list of options.
It's perfect for when you have a large list of options and want to help users
find what they're looking for quickly.

**See**

https://bomb.sh/docs/clack/packages/prompts/#autocomplete

**Example**

```ts twoslash
// @include: imports
import { autocomplete } from "@clack/prompts";

const framework = await autocomplete({
  message: "Search for a framework",
  options: [
    { value: "next", label: "Next.js", hint: "React framework" },
    { value: "astro", label: "Astro", hint: "Content-focused" },
    { value: "svelte", label: "SvelteKit", hint: "Compile-time framework" },
    { value: "remix", label: "Remix", hint: "Full stack framework" },
    { value: "nuxt", label: "Nuxt", hint: "Vue framework" },
  ],
  placeholder: "Type to search...",
  maxItems: 5,
});
```

[autocompleteMultiselect](prompts.Variable.autocompleteMultiselect.md)

The `autocompleteMultiselect` prompt combines the search functionality of autocomplete
with the ability to select multiple options.

**See**

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

**Example**

```ts twoslash
// @include: imports
import { autocompleteMultiselect } from "@clack/prompts";

const frameworks = await autocompleteMultiselect({
  message: "Select frameworks",
  options: [
    { value: "next", label: "Next.js", hint: "React framework" },
    { value: "astro", label: "Astro", hint: "Content-focused" },
    { value: "svelte", label: "SvelteKit", hint: "Compile-time framework" },
    { value: "remix", label: "Remix", hint: "Full stack framework" },
    { value: "nuxt", label: "Nuxt", hint: "Vue framework" },
  ],
  placeholder: "Type to search...",
  maxItems: 5,
});
```

[box](prompts.Variable.box.md)

Renders a customizable box around text content. It's similar to [note](prompts.Variable.note.md) but offers
more styling options.

**See**

https://bomb.sh/docs/clack/packages/prompts/#box

**Example**

```ts twoslash
// @include: imports
import { box } from "@clack/prompts";

box("This is the content of the box", "Box Title", {
  contentAlign: "center",
  titleAlign: "center",
  width: "auto",
  rounded: true,
});
```

[cancel](prompts.Variable.cancel.md)

The `cancel` function defines an interruption of an interaction
and therefore its end.

**See**

https://bomb.sh/docs/clack/packages/prompts/#cancel

**Example**

```ts twoslash
// @include: imports
import { cancel } from "@clack/prompts";
import process from "node:process";

cancel("Installation canceled");
process.exit(1);
```

[CANCEL\_SYMBOL](prompts.Variable.CANCEL_SYMBOL.md)

‐

[confirm](prompts.Variable.confirm.md)

The `confirm` prompt accepts a yes or no choice, returning a boolean value
corresponding to the user's selection.

**See**

https://bomb.sh/docs/clack/packages/prompts/#confirmation

**Example**

```ts twoslash
// @include: imports
import { confirm } from "@clack/prompts";

const shouldProceed = await confirm({
  message: "Do you want to continue?",
});
```

[date](prompts.Variable.date.md)

The `date` prompt provides an interactive date picker, allowing users
to navigate between year, month, and day segments and
increment/decrement values using keyboard controls.

**See**

https://bomb.sh/docs/clack/packages/prompts/#date-input

**Example**

```ts twoslash
// @include: imports
import { date } from "@clack/prompts";

const birthday = await date({
  message: "Pick your birthday",
  minDate: new Date("1900-01-01"),
  initialValue: new Date(),
  maxDate: new Date(),
});
```

[group](prompts.Variable.group.md)

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 displayed sequentially.

**See**

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

**Example**

```ts twoslash
// @include: imports
import { group, text, password } from "@clack/prompts";

const account = await group({
  email: () =>
    text({
      message: "What is your email address?",
    }),
  username: ({ results }) =>
    text({
      message: "What is your username?",
      placeholder: results.email?.replace(/@.+$/, "").toLowerCase() ?? "",
    }),
  password: () =>
    password({
      message: "Define your password",
    }),
});
```

[groupMultiselect](prompts.Variable.groupMultiselect.md)

The `groupMultiselect` prompt extends the [multiselect](prompts.Variable.multiselect.md) prompt to allow
arranging distinct Multi-Selects, whilst keeping all of them interactive.

**See**

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

**Example**

```ts twoslash
// @include: imports
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" },
    ],
  },
});
```

[intro](prompts.Variable.intro.md)

The `intro` function defines the beginning of an interaction.

**See**

https://bomb.sh/docs/clack/packages/prompts/#intro

**Example**

```ts twoslash
// @include: imports
import { intro } from "@clack/prompts";

intro("Welcome to clack");
```

[isCI](prompts.Variable.isCI.md)

‐

[isTTY](prompts.Variable.isTTY.md)

‐

[limitOptions](prompts.Variable.limitOptions.md)

Trims an option list to what fits the terminal, while keeping the active
option (cursor) visible using a Clack style sliding window.

**See**

https://bomb.sh/docs/clack/packages/prompts/#limitoptions

**Example**

```ts twoslash
// @include: imports
import { limitOptions } from "@clack/prompts";
import { styleText } from "node:util";

const options = ["apple", "banana", "cherry", "date"];
const lines = limitOptions({
  options,
  cursor: 2,
  maxItems: 8,
  style: (opt, active) =>
    active ? styleText("cyan", opt) : styleText("dim", opt),
});
```

[log](prompts.Variable.log.md)

‐

[multiline](prompts.Variable.multiline.md)

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

**See**

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

**Example**

```ts twoslash
// @include: imports
import { multiline } from "@clack/prompts";

const bio = await multiline({
  message: "Enter your bio",
  placeholder: "Tell us about yourself...",
  showSubmit: true,
});
```

[multiselect](prompts.Variable.multiselect.md)

‐

[MULTISELECT\_INSTRUCTIONS](prompts.Variable.MULTISELECT_INSTRUCTIONS.md)

‐

[note](prompts.Variable.note.md)

‐

[outro](prompts.Variable.outro.md)

The `outro` function defines the end of an interaction.

**See**

https://bomb.sh/docs/clack/packages/prompts/#outro

**Example**

```ts twoslash
// @include: imports
import { outro } from "@clack/prompts";

outro("All operations are finished");
```

[password](prompts.Variable.password.md)

The password prompt behaves like the [text](prompts.Variable.text.md) prompt, but the input is masked.

**See**

https://bomb.sh/docs/clack/packages/prompts/#password-input

**Example**

```ts twoslash
// @include: imports
import { password } from "@clack/prompts";

const result = await password({
  message: "Enter your password",
});
```

[path](prompts.Variable.path.md)

The `path` prompt extends `autocomplete` to provide file and directory suggestions.

**See**

https://bomb.sh/docs/clack/packages/prompts/#path-selection

**Example**

```ts twoslash
// @include: imports
import { path } from "@clack/prompts";

const result = await path({
  message: "Select a file:",
  root: process.cwd(),
  directory: false,
});
```

[S\_BAR](prompts.Variable.S_BAR.md)

‐

[S\_BAR\_END](prompts.Variable.S_BAR_END.md)

‐

[S\_BAR\_END\_RIGHT](prompts.Variable.S_BAR_END_RIGHT.md)

‐

[S\_BAR\_H](prompts.Variable.S_BAR_H.md)

‐

[S\_BAR\_START](prompts.Variable.S_BAR_START.md)

‐

[S\_BAR\_START\_RIGHT](prompts.Variable.S_BAR_START_RIGHT.md)

‐

[S\_CHECKBOX\_ACTIVE](prompts.Variable.S_CHECKBOX_ACTIVE.md)

‐

[S\_CHECKBOX\_INACTIVE](prompts.Variable.S_CHECKBOX_INACTIVE.md)

‐

[S\_CHECKBOX\_SELECTED](prompts.Variable.S_CHECKBOX_SELECTED.md)

‐

[S\_CONNECT\_LEFT](prompts.Variable.S_CONNECT_LEFT.md)

‐

[S\_CORNER\_BOTTOM\_LEFT](prompts.Variable.S_CORNER_BOTTOM_LEFT.md)

‐

[S\_CORNER\_BOTTOM\_RIGHT](prompts.Variable.S_CORNER_BOTTOM_RIGHT.md)

‐

[S\_CORNER\_TOP\_LEFT](prompts.Variable.S_CORNER_TOP_LEFT.md)

‐

[S\_CORNER\_TOP\_RIGHT](prompts.Variable.S_CORNER_TOP_RIGHT.md)

‐

[S\_ERROR](prompts.Variable.S_ERROR.md)

‐

[S\_INFO](prompts.Variable.S_INFO.md)

‐

[S\_PASSWORD\_MASK](prompts.Variable.S_PASSWORD_MASK.md)

‐

[S\_RADIO\_ACTIVE](prompts.Variable.S_RADIO_ACTIVE.md)

‐

[S\_RADIO\_INACTIVE](prompts.Variable.S_RADIO_INACTIVE.md)

‐

[S\_STEP\_ACTIVE](prompts.Variable.S_STEP_ACTIVE.md)

‐

[S\_STEP\_CANCEL](prompts.Variable.S_STEP_CANCEL.md)

‐

[S\_STEP\_ERROR](prompts.Variable.S_STEP_ERROR.md)

‐

[S\_STEP\_SUBMIT](prompts.Variable.S_STEP_SUBMIT.md)

‐

[S\_SUCCESS](prompts.Variable.S_SUCCESS.md)

‐

[S\_WARN](prompts.Variable.S_WARN.md)

‐

[select](prompts.Variable.select.md)

‐

[SELECT\_INSTRUCTIONS](prompts.Variable.SELECT_INSTRUCTIONS.md)

‐

[selectKey](prompts.Variable.selectKey.md)

‐

[settings](prompts.Variable.settings.md)

‐

[spinner](prompts.Variable.spinner.md)

‐

[stream](prompts.Variable.stream.md)

‐

[symbol](prompts.Variable.symbol.md)

‐

[symbolBar](prompts.Variable.symbolBar.md)

‐

[taskLog](prompts.Variable.taskLog.md)

Renders a log which clears on success and remains on failure

[tasks](prompts.Variable.tasks.md)

Define a group of tasks to be executed

[text](prompts.Variable.text.md)

The text prompt accepts a single line of text.

**See**

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

**Example**

```ts twoslash
// @include: imports
import { text } from "@clack/prompts";

const name = await text({
  message: "What is your name?",
  placeholder: "John Doe",
  validate: (value) => {
    if (!value || value.length < 2) return "Name must be at least 2 characters";
    return undefined;
  },
});
```

[unicode](prompts.Variable.unicode.md)

‐

[unicodeOr](prompts.Variable.unicodeOr.md)

‐

## Functions

[formatInstructionFooter](prompts.Function.formatInstructionFooter.md)

‐

[isCancel](prompts.Function.isCancel.md)

‐

[progress](prompts.Function.progress.md)

‐

[updateSettings](prompts.Function.updateSettings.md)

‐
