Utility
Terminal
Installation
$ pnpm dlx shadcn@latest add @termcn/ink/toast
Usage
import { Toast } from "@/components/ui/toast";<Toast
variant="success"
message="Settings saved successfully."
duration={5000}
onDismiss={() => console.log("toast closed")}
/>Examples
Error with Longer Duration
Terminal
API Reference
Toast
| Prop | Type | Default |
|---|---|---|
message | string | required |
variant | "success" | "error" | "warning" | "info" | "info" |
duration | number | 3000 |
onDismiss | () => void | - |
icon | string | - |
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.