# Adding a cursor over on hover

You can change the [cursor](https://developer.mozilla.org/en-US/docs/Web/CSS/cursor) when the mouse is over an element or an area. There are two methods described here:&#x20;

* Defining a style declaration and assigning it in the classes field
* Defining the cursor style in the styles fieldf

#### Defining a style declaration&#x20;

* Create a [code block](/web-export/creating-code-blocks.md) (or define the class in the page [stylesheet template](/web-export/export-artboard-dialog/stylesheet-template.md))
* In the code block create a style declaration named pointerCursor:&#x20;

```
<style>
.pointerCursor {
   cursor: pointer;
}
</style>
```

If you are defining the class in the [stylesheet template](/web-export/export-artboard-dialog/stylesheet-template.md) then exclude the style tags like so:&#x20;

```
.pointerCursor {
    cursor: pointer;
}
```

Assign the [class](/web-export/element-options/classes.md) to the element you want to have a cursor:&#x20;

![](/files/-MDVodjhs5dRkfBGVCxI)

To have a cursor change only when the mouse is hovering over the element use the [hover](https://developer.mozilla.org/en-US/docs/Web/CSS/:hover) pseudo state:&#x20;

```
<style>
.pointerCursor:hover {
   cursor: pointer;
}
</style>
```

{% hint style="info" %}
Unlike other styles and properties the cursor only changes when the mouse is over an element so either style declaration will work.&#x20;
{% endhint %}

#### Defining the cursor style in the styles field

You can also add a cursor by setting the cursor style in the [styles](/web-export/element-options/untitled.md) field:&#x20;

![](/files/-MDVnAyuWTTIc41_Vete)

{% embed url="<https://developer.mozilla.org/en-US/docs/Web/CSS/cursor>" %}

{% embed url="<https://developer.mozilla.org/en-US/docs/Web/CSS/:hover>" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://velara-3.gitbook.io/web-export/code-block-snippets/adding-a-cursor-over-on-hover.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
