> For the complete documentation index, see [llms.txt](https://docs.uibakery.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.uibakery.io/reference/working-with-components/icon.md).

# Icon

## Overview

An icon image. The component supports different alignment options, sizes, as well as the *Auto size* option.

<figure><img src="/files/WUtmOOHh6XujDmWLAeR6" alt=""><figcaption></figcaption></figure>

{% hint style="success" %}
We support the icons from our icons collection as well as Material icons.
{% endhint %}

### Properties

| Name   | Type     | Description    |
| ------ | -------- | -------------- |
| `name` | `string` | Component name |

### Methods

<table><thead><tr><th width="99.9453125">Name</th><th width="133.54296875">Parameters</th><th width="104.87109375">Returns</th><th>Description</th></tr></thead><tbody><tr><td><code>setIcon</code></td><td><code>icon: string</code></td><td><code>void</code></td><td>Set component icon setting</td></tr></tbody></table>

### Triggers

<table><thead><tr><th width="138.19140625">Name</th><th>Description</th></tr></thead><tbody><tr><td><strong>On Click</strong></td><td>Triggered when the component is clicked</td></tr><tr><td><strong>On Init</strong></td><td>Triggered when the component is initialized</td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://docs.uibakery.io/reference/working-with-components/icon.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.
