Hover tooltip anchored to a target element.
import { Tooltip } from 'nikcli-tui';
const target = new Box({ parent: screen, width: 20, height: 3 }).el; new Tooltip({ parent: screen, target, content: 'Tooltip' });
npm run tsx:core-gallery
npm i nikcli-tui
import { Tooltip, Box } from 'nikcli-tui';
const target = new Box({ parent: screen, top: 1, left: 2, width: 12, height: 3, borderStyle: 'line', label: 'Hover' }).el; new Tooltip({ parent: screen, content: 'Hello', target });
new Tooltip({ parent: screen, content: 'Top', target, position: 'top' }); new Tooltip({ parent: screen, content: 'Right', target, position: 'right' });