---
url: "https://vueda.dev/v3/reference/api/js/use/useIcons/functions/useIcons.md"
title: "useIcons"
---

# useIcons

## Overview

A hook to get the icon entry for a given icon name within a component's icon slots.
Returns null if no entry is registered for the requested slot.

When `props` (carrying `ICON_OVERRIDE_PROPS`) is supplied, the component's own `iconOverride`
prop is folded into the merged override (ancestor + self) and provided to descendants, so the
component's own icons honor its prop. Mirrors `useTheme` / `useThemeOverride`: Vue `inject`
cannot observe a same-component `provide`, so the merged ref returned by `useIconsOverride` is
consumed directly. Without `props`, resolution reads the injected ancestor override as before.

## Signature

`useIcons(componentName, props)`

### Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| <span id="param-componentName">componentName</span> | `string` | yes | The name of the component. |
| <span id="param-props">props</span> | `object` | no | Reactive props carrying `iconOverride` (from `ICON_OVERRIDE_PROPS`). |

#### props Properties

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| <span id="param-props-iconOverride">iconOverride</span> | `IconRegistry` |  |  |  |

### Returns

[UseIconsReturnFunction](/v3/reference/api/js/use/useIcons/types/UseIconsReturnFunction.md)

## Source

`client/lib/use/useIcons.js:149`
