---
url: /reference/api/logger/prompts.Variable.box.md
---
# Variable: box

```ts twoslash
// @include: imports
const box: (message?, title?, opts?) => void;
```

Defined in: node\_modules/.pnpm/@clack+prompts@1.9.0/node\_modules/@clack/prompts/dist/index.d.mts:291

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

## Parameters

`message?`

`string`

The content to display inside the box.

`title?`

`string`

The title to display in the top border of the box.

`opts?`

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

Optional configuration for the box styling and behavior.

## Returns

`void`

## 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,
});
```
