Skip to content

Variable: box ​

ts
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 but offers more styling options.

Parameters ​

ParameterTypeDescription

message?

string

The content to display inside the box.

title?

string

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

opts?

BoxOptions

Optional configuration for the box styling and behavior.

Returns ​

void

See ​

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

Example ​

ts
import { 
box
} from "@clack/prompts";
box
("This is the content of the box", "Box Title", {
contentAlign
: "center",
titleAlign
: "center",
width
: "auto",
rounded
: true,
});

Released under the MIT License