Themes
- Default
- Catppuccin
- Dracula
- High Contrast
- High Contrast Light
- Monokai
- Nord
- One Dark
- Solarized
- Tokyo Night
- AMOLED
- Aura
- Ayu
- Carbonfox
- Catppuccin Frappe
- Catppuccin Macchiato
- Cobalt2
- Cursor
- Everforest
- Flexoki
- GitHub
- Gruvbox
- Kanagawa
- Lucent Orng
- Material
- Matrix
- Mercury
- Night Owl
- OC-2
- One Dark Pro
- OpenCode
- Orng
- Osaka Jade
- Palenight
- Rose Pine
- Shades of Purple
- Synthwave '84
- Vercel
- Vesper
- Zenburn
Utility
AI
Terminal
alert-demo
No opentui live preview is registered for this example yet.
Installation
$ pnpm dlx shadcn@latest add @termcn/opentui-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
alert-error
No opentui live preview is registered for this example yet.
Warning
Use variant="warning" to display a warning alert.
Terminal
alert-warning
No opentui live preview is registered for this example yet.
Without Border
Set bordered={false} to remove the border.
Terminal
alert-no-border
No opentui live preview is registered for this example yet.
Custom Icon and Color
Override the icon and color with icon and color props.
Terminal
alert-custom
No opentui live preview is registered for this example yet.
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 |