Skip to main content

Tooltip

Component giúp hiển thị tooltip khi hover vào một element.

Ví dụ

import { Tooltip } from '@xotiny/preact';
import { FC } from 'preact/compat';

export const TooltipDemo: FC = () => {
return (
<div style={{ padding: 20 }}>
<Tooltip content="This is a tooltip">
<button>Tooltip</button>
</Tooltip>
</div>
);
};

Props

NameTypeDefaultDescription
contentPreactNode-Nội dung của tooltip
zIndexnumber10Z-index của tooltip