---
title: "Icon | No Name Studio"
canonical_url: "https://nnsvn.me/vi/products/nuxt-starter-kit/components/docs/icon"
meta:
  author: "No Name Studio"
  keywords: "No Name Studio, software development, web development, SaaS, digital products, freelance developers, Vietnam"
  "og:image": "https://nnsvn.me/pwa-512x512.png"
  "og:title": Icon
  "twitter:image": "https://nnsvn.me/pwa-512x512.png"
  "twitter:title": Icon
---

> Index of every page on this site: [llms.txt](https://nnsvn.me/llms.txt)

Trang này chưa có bản dịch Tiếng Việt. Bạn đang xem bản gốc (English).

# **Icon**

The icon component uses ****Lucide Vue**** under the hood for string icon names. Check out the full icon list from Lucide.

## Overview

`ct-icon` is a smart icon component that automatically detects and renders the correct element based on the `name` prop:

| **Input type** | **Example** | **Renders** |
| --- | --- | --- |
| Empty / undefined | — | Default fallback (`CircleHelp`) |
| Vue Component | `:name="MyIcon"` | `<component :is>` |
| Emoji | `name="🚀"` | `<span>` with font-size |
| Image URL or path | `name="/logo.svg"` | `<NuxtImg>` with lazy loading |
| File extension / name | `name="js"`, `name="vue"` | Matched icon via `useFileIcon` |
| Lucide icon string | `name="lucide:box"` | Resolved Lucide component |
| Unresolved string | `name="unknown"` | Default fallback (`CircleHelp`) |

## Usage

### Lucide Icons

Pass a Lucide icon name using the `lucide:` prefix or just the kebab-case name directly.

****Lucide****

### File-Type Icons

Pass a file extension or known filename to automatically resolve a technology icon (e.g. TypeScript, Vue, Python).

****File Types****

### Emojis

Pass an emoji string directly. Use the `:size` prop to control the font size.

****Emojis****

😍🚀🎉

### Images (URL or Path)

Pass an image URL or local path. The component renders a `<NuxtImg>` with lazy loading and explicit `width`/`height` for better performance.

****URL****

### Default Fallback

When no `name` is provided or the name cannot be resolved, a default `CircleHelp` icon is rendered.

****Fallback****

## Props

**name**string | Component

Icon name, emoji, image URL, file extension, or a Vue component. Falls back to `CircleHelp` when empty or unresolved.

**size**number

`16`

Icon size in pixels. Controls both `width`/`height` for images and `size` prop for Lucide icons.

**class**string

Additional CSS classes to apply to the rendered element.

## Resolution Order

The component resolves the `name` prop in the following priority:

1. ****Empty**** → renders the default `CircleHelp` icon.
2. ****Vue Component**** → renders the component directly via `<component :is>`.
3. ****Emoji**** → renders inside a `<span>` with matching font size.
4. ****Image**** → renders via `<NuxtImg>` with `lazy` loading, explicit `width` and `height`.
5. ****File-type match**** → resolves via `useFileIcon` (supports extensions like `js`, `vue`, `ts`, `py`, and known filenames like `package.json`).
6. ****Lucide icon**** → converts the name to PascalCase and looks up the Lucide icon registry.
7. ****Unresolved**** → falls back to the default `CircleHelp` icon.

[Phản ánh vấn đề](https://github.com/No-Name-Studio-VN/Homepage/issues/new/choose)· [Chỉnh sửa trang này](https://github.com/No-Name-Studio-VN/Homepage/edit/main/content/1.products/1.nuxt-starter-kit/2.components/2.docs/icon.md)

```json
{"@context":"https://schema.org","@type":"Article","headline":"Icon","description":"","url":"https://nnsvn.me/vi/products/nuxt-starter-kit/components/docs/icon","mainEntityOfPage":{"@type":"WebPage","@id":"https://nnsvn.me/vi/products/nuxt-starter-kit/components/docs/icon"},"publisher":{"@type":"Organization","name":"No Name Studio"}}
```

```json
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Products","item":"https://nnsvn.me/vi/products/nuxt-starter-kit/getting-started/introduction"},{"@type":"ListItem","position":2,"name":"Nuxt Starter Kit","item":"https://nnsvn.me/vi/products/nuxt-starter-kit/getting-started/introduction"},{"@type":"ListItem","position":3,"name":"Components","item":"https://nnsvn.me/vi/products/nuxt-starter-kit/components/prose/markdown"},{"@type":"ListItem","position":4,"name":"Docs","item":"https://nnsvn.me/vi/products/nuxt-starter-kit/components/docs/alert"},{"@type":"ListItem","position":5,"name":"Icon","item":"https://nnsvn.me/vi/products/nuxt-starter-kit/components/docs/icon"}]}
```

```json
{"@context":"https://schema.org","@graph":[{"@id":"https://nnsvn.me/vi#website","@type":"WebSite","description":"No Name Studio is a freelance software team building production-grade web applications, SaaS platforms, and digital products for startups and enterprises.","inLanguage":"vi","name":"No Name Studio","url":"https://nnsvn.me/vi","publisher":{"@id":"https://nnsvn.me/#identity"},"translationOfWork":{"@id":"https://nnsvn.me/#website"}},{"@id":"https://nnsvn.me/vi/products/nuxt-starter-kit/components/docs/icon#webpage","@type":"WebPage","name":"Icon","url":"https://nnsvn.me/vi/products/nuxt-starter-kit/components/docs/icon","isPartOf":{"@id":"https://nnsvn.me/vi#website"},"potentialAction":[{"@type":"ReadAction","target":["https://nnsvn.me/vi/products/nuxt-starter-kit/components/docs/icon"]}]},{"@id":"https://nnsvn.me/#identity","@type":"Organization","name":"No Name Studio","url":"https://nnsvn.me"}]}
```

## Sitemap

See the full [sitemap](https://nnsvn.me/sitemap.md) for all pages.
