# Add a Tooltip to the TreeView Component

## Environment

<table>
    <tbody>
	    <tr>
	    	<td>Product Version</td>
	    	<td>3.3.2</td>
	    </tr>
	    <tr>
	    	<td>Product</td>
	    	<td>Progress® Kendo UI for Vue</td>
	    </tr>
    </tbody>
</table>

## Description

Learn how to add the [Tooltip](https://www.telerik.com/kendo-vue-ui-develop/components/tooltip) component to the [TreeView](https://www.telerik.com/kendo-vue-ui-develop/components/tooltip) in the Kendo UI for Vue suite.

**KB sections**

* [Solution description](https://www.telerik.com/kendo-vue-ui-develop/components/knowledge-base/add-tooltip-to-treeview#solution-description)
* [Runnable example](https://www.telerik.com/kendo-vue-ui-develop/components/knowledge-base/add-tooltip-to-treeview#runnable-example)

## Solution description

To display the `Tooltip` when hovering a node in the `TreeView`, you have to define a custom template for the TreeView items. The custom template of the TreeView can be defined through its [item](https://www.telerik.com/kendo-vue-ui-develop/components/treeview/api/treeviewprops#item) property.

The runnable example in the next section below, uses the following template which is passed to the `item` prop of the TreeView.

```js
<template #item="{ props }">
  <span :title="props.item.description">
    <span :class="iconClassName(props.item)" key="0" />
    {{ props.item.text }}
  </span>
</template>
```

In the above template you can see that we are passing the value of the `description` dataItem field to the `title` attribute of the span element rendered in each item. Once we have a `title` attribute definition for each TreeView node, we only have to initialize the Tooltip as follows:

```js
    <Tooltip :position="'right'" :anchor-element="'target'">
      .............
	  TreeView definition
      .............
    </Tooltip>
```

### Runnable example

[Demo Source](https://demos.telerik.com/kendo-vue-ui/knowledge-base/add-tooltip-to-treeview/source.txt)
