Skip to content

Alert

widgetsfeedback

Alert: full-width status message box with a colored border and an icon prefix

Installation

$ bunx termuijs add alert

Copies the source into src/components/alert/ and installs @termuijs/core, @termuijs/widgets.

Usage

ts
import { Alert } from '@termuijs/widgets'
ts
new Alert(opts: AlertOptions, style: Partial<Style> = {})

API Reference

Alert

PropTypeRequiredDescription
variantStatusVariantoptionalVariant determines icon and border color
messagestringrequiredThe message to display
#feedback#alert