Logoshadcn-docs-template
DocsDemo
Sections
  • Get Started
Getting Started
  • Introduction
  • Installation
Customization
  • Customizing the Template
  • MDC Components
  • Composables
  • Writing Documentation
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)

LucideIcon

PreviousNext

A wrapper component for Lucide icons that supports multiple naming conventions.

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 → ArrowLeft
  • user-circle → UserCircle

API Reference

LucideIcon

PropTypeDescription
namestringIcon name in any supported format
classstringCustom 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
---
GitHubLinkMainNav

On This Page

UsageFeaturesMultiple Naming ConventionsAutomatic ConversionAPI ReferenceLucideIconExamplesBasic UsageWith PrefixKebab CaseIntegration
© shadcn-vue.com