termprompt

note

Display a boxed note with an optional title.

Preview

With title

note
│
│ ──────────────────────────
│ Next Steps
│ Run the following command
│ to start:
│
│ npm run dev
│ ──────────────────────────

Without title

note
│
│ ──────────────────────────
│ All tests passed.
│ ──────────────────────────

Usage

import { note } from 'termprompt';

note('Run the following command to start:\n\n  npm run dev', 'Next Steps');

Parameters

ParamTypeDescription
messagestringContent (supports newlines)
titlestring?Optional title above content

With Title

note('DATABASE_URL=postgres://...\nREDIS_URL=redis://...', 'Environment Variables');

The title renders in bold using the success theme color, surrounded by horizontal rules.

Without Title

note('All tests passed.');

When no title is provided, the top rule renders in gray.

On this page