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

# use/useIcons

## Overview

Resolves and caches component icon entries by merging the default icon registry with
inherited and local overrides.

Each icon entry is a `{ component, props }` pair. `component` must be a Vue component definition
(markRaw is applied automatically on write so entries are safe in reactive contexts). `props` is
an optional plain object merged shallowly with any caller-supplied props at render time.

Override semantics are replace: an override entry wins entirely over the default for that icon slot.

A registry's `Default` key holds entries for any component. A component looks up an icon name in
its own override entry, then the override's `Default`, then its own default registry entry, then the
default registry's `Default`.

## Properties

### ICON_OVERRIDE_PROPS {#ICON_OVERRIDE_PROPS}

Vue component props definition for components that accept an icon override prop.
Spread into component options to let callers supply a partial icon registry that is merged
with inherited (ancestor) and default icon entries and scoped to this component and its
descendants. Mirrors `THEME_OVERRIDE_PROPS`.

@vueda-spread props

Type: `object`

Source: `client/lib/use/useIcons.js:98`

## Methods

- [getIcons](/v3/reference/api/js/use/useIcons/functions/getIcons.md) - Get the default icon registry.
- [patchIcons](/v3/reference/api/js/use/useIcons/functions/patchIcons.md) - Patch the default icon registry with a partial registry.
- [setIcons](/v3/reference/api/js/use/useIcons/functions/setIcons.md) - Set the default icon registry, replacing any previously registered defaults.
- [useIcons](/v3/reference/api/js/use/useIcons/functions/useIcons.md) - A hook to get the icon entry for a given icon name within a component's icon slots.
- [useIconsOverride](/v3/reference/api/js/use/useIcons/functions/useIconsOverride.md) - Merge a local icon registry override with ancestor overrides and provide the result for descendant components.

## Types

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

`ComponentIcons = object`

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

| Name | Type | Description |
| --- | --- | --- |
| component | Component |  |
| props | object |  |

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

| Name | Type | Description |
| --- | --- | --- |
| iconOverride | IconRegistry |  |

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

`IconRegistry = object`

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

`UseIconsReturnFunction = (iconName: string) => IconEntry | null`

## Source

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