简体中文
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
| Parameter | Type | Description |
|---|---|---|
|
| The content to display inside the box. |
|
| The title to display in the top border of the box. |
| 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,
});
