title
Description
Optional. Sets a tooltip text for the icon elementUsage
title?: string;
Example
import { Icon } from "@svar-ui/react-core";
export default function Example() {
function showInfo() {
alert("This is the info icon");
}
// hover tooltip + click action
return (
<Icon title="More information" className="info-icon" onClick={showInfo}>
ℹ️
</Icon>
);
}
.info-icon {
font-size: 22px;
color: dodgerblue;
}
.info-icon:hover {
color: royalblue;
}