Utility
Terminal
Installation
$ pnpm dlx shadcn@latest add @termcn/ink/tooltip
Usage
import { Tooltip } from "@/components/ui/tooltip";<Tooltip content="Save your current progress" position="top" isVisible={true}>
<Text bold>[S] Save</Text>
</Tooltip>API Reference
Tooltip
| Prop | Type | Default |
|---|---|---|
children | ReactNode | required |
content | string | required |
position | "top" | "bottom" | "left" | "right" | "top" |
isVisible | boolean | false |
borderStyle | "single" | "double" | "round" | "bold" | "singleDouble" | "doubleSingle" | "classic" | "single" |
borderColor | string | - |
paddingX | number | 1 |
paddingY | number | 0 |
gap | number | 1 |
arrowDown | string | "↓" |
arrowUp | 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.