Sections
Getting Started
Components
- DocTabs
- Callout
- ComponentPreview
- CommandMenu
- CopyButton
- DocsSidebar
- DocsTableOfContents
- PageHeader
- SiteHeader
- CopyCodeButton
- DocsCopyPage
- CodeBlockCommand
- CommandMenuItem
- CommandMenuKbd
- GitHubLink
- LucideIcon
- MainNav
- MobileNav
- ModeSwitcher
- PageHeaderDescription
- PageHeaderHeading
- SiteBody
- SiteConfig
- SiteFooter
- OgImage (Custom)
The LucideIcon component provides a flexible way to use Lucide icons with support for different naming conventions.
Usage
<script setup lang="ts">
import { LucideIcon } from '@/components/LucideIcon'
</script>
<template>
<LucideIcon name="icon-home" />
<LucideIcon name="lucide:home" />
<LucideIcon name="home" />
</template>Features
Multiple Naming Conventions
Supports three naming formats:
icon-*(e.g.,icon-home)lucide:*(e.g.,lucide:home)- Direct name (e.g.,
home)
Automatic Conversion
Converts kebab-case to PascalCase:
arrow-left→ArrowLeftuser-circle→UserCircle
API Reference
LucideIcon
| Prop | Type | Description |
|---|---|---|
name | string | Icon name in any supported format |
class | string | Custom CSS classes |
Examples
Basic Usage
<template>
<LucideIcon name="home" />
</template>With Prefix
<template>
<LucideIcon name="icon-edit" />
<LucideIcon name="lucide:settings" />
</template>Kebab Case
<template>
<LucideIcon name="arrow-left" />
<LucideIcon name="user-circle" />
</template>Integration
This component is used throughout the template for:
- Navigation icons in sidebar
- Page icons in frontmatter
- Component icons
Set icons in markdown frontmatter:
---
title: My Page
---