Utility
Terminal
Installation
$ pnpm dlx shadcn@latest add @termcn/ink/alert
Usage
import { Alert } from "@/components/ui/alert";<Alert variant="success" title="Build complete">
Everything is ready to ship.
</Alert>Examples
Error
Use variant="error" to display an error alert.
Terminal
Warning
Use variant="warning" to display a warning alert.
Terminal
Without Border
Set bordered={false} to remove the border.
Terminal
Custom Icon and Color
Override the icon and color with icon and color props.
Terminal
API Reference
Alert
| Prop | Type | Default |
|---|---|---|
variant | "success" | "error" | "warning" | "info" | "info" |
title | string | - |
children | ReactNode | - |
icon | string | - |
bordered | boolean | true |
borderStyle | "single" | "double" | "round" | "bold" | "singleDouble" | "doubleSingle" | "classic" | - |
color | string | - |
paddingX | number | 1 |
paddingY | number | 0 |
Notes
Accessibility
termcn exposes the following behavior through Ink's terminal accessibility APIs. This is not a browser ARIA or general WCAG-conformance claim.
- Screen reader: Screen-reader mode removes decorative output while preserving meaningful labels and state.