Skip to main content

title

Description

Optional. Sets a tooltip text for the icon element

Usage

title?: string;

Example

<script>
import { Icon } from "@svar-ui/svelte-core";

function showInfo() {
alert("This is the info icon");
}
</script>

<!-- hover tooltip + click action -->
<Icon title="More information" css="info-icon" onclick={showInfo}>
ℹ️
</Icon>

<style>
.info-icon {
font-size: 22px;
color: dodgerblue;
}
.info-icon:hover {
color: royalblue;
}
</style>