Skip to content
| Marketplace
Sign in
Visual Studio Code>Snippets>Lord Icon PreviewNew to Visual Studio Code? Get it now.
Lord Icon Preview

Lord Icon Preview

Phellipe Rodrigues

|
10 installs
| (1) | Free
Instantly preview Lord Icons in VS Code by hovering over icon IDs or using the context menu. Supports JavaScript, TypeScript, HTML, JSX, and TSX files with automatic 8-character ID detection.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Lord Icon Preview Extension

A Visual Studio Code extension that provides instant preview of Lord Icons by detecting icon IDs in your code. Support for JavaScript, TypeScript, HTML, JSX, and TSX files with automatic 8-character alphanumeric ID detection.

VS Code Extension TypeScript License

✨ Features

  • 🔍 Hover Preview: Instantly preview Lord Icons by hovering over 8-character icon IDs
  • 🖱️ Context Menu: Right-click on selected text to preview icons
  • ⌨️ Keyboard Shortcut: Use Ctrl+Shift+I (or Cmd+Shift+I on Mac) to preview selected icons
  • 🖼️ Interactive Webview: Full-size icon viewer with size controls and animation triggers
  • 📄 Multi-language Support: Works with JavaScript, TypeScript, HTML, JSX, and TSX files
  • 🤖 Automatic Detection: Zero configuration - automatically detects valid 8-character alphanumeric IDs
  • 📏 Size Controls: Adjust preview size (60px, 120px, 200px, 300px)
  • 🎬 Animation Controls: Play, pause, and trigger icon animations
  • 📋 Copy Functionality: Copy HTML code examples and CDN URLs
  • 🎨 Professional Icon: Custom extension icon with crown and magnifying glass

🚀 Quick Start

  1. Install the extension from the VS Code Marketplace
  2. Open any supported file (JS, TS, HTML, JSX, TSX)
  3. Add a Lord Icon ID (e.g., lftzgwgx) to your code
  4. Hover over the ID to see an instant preview
  5. Right-click for full-size view with controls

📖 Usage

Hover Preview

const icons = {
    home: 'lftzgwgx',      // ← Hover here for instant preview
    search: 'warimioc',    // ← Works with any 8-character ID
    profile: 'rpviwvwn'    // ← Detects quoted and unquoted IDs
};

Context Menu

  1. Select an 8-character icon ID in your editor
  2. Right-click → "Preview Lordicon"
  3. Interactive webview opens with full controls

Keyboard Shortcut

  • Windows/Linux: Ctrl+Shift+I
  • Mac: Cmd+Shift+I

🎯 Supported File Types

  • JavaScript (.js)
  • TypeScript (.ts)
  • HTML (.html)
  • JSX (.jsx)
  • TSX (.tsx)

🛠️ Development

Prerequisites

  • Node.js (v16 or higher)
  • npm (v7 or higher)
  • Visual Studio Code

Setup

# Clone the repository
git clone https://github.com/phelliperodrigues/lordicon-preview.git
cd lordicon-preview

# Install dependencies
npm install

# Compile the extension
npm run compile

# Open in VS Code
code .

Testing

  1. Press F5 to open Extension Development Host
  2. Open example files in examples/ folder
  3. Test hover, context menu, and keyboard shortcuts

Building

# Compile TypeScript
npm run compile

# Build VSIX package
npx vsce package

📁 Project Structure

lordicon-preview/
├── src/
│   └── extension.ts         # Main extension logic
├── examples/
│   ├── example.js          # JavaScript example
│   ├── example.ts          # TypeScript example
│   └── example.html        # HTML example
├── package.json            # Extension manifest
├── tsconfig.json           # TypeScript configuration
├── icon.png               # Extension icon (128x128)
├── icon.svg               # Icon source file
├── CHANGELOG.md           # Version history
├── CONTRIBUTING.md        # Contribution guidelines
└── README.md              # This file

🔧 Technical Details

Icon Detection

  • Pattern: ^[a-zA-Z0-9]{8}$
  • Supports: Quoted and unquoted IDs
  • CDN: https://cdn.lordicon.com/{iconId}.json

Extension API

  • vscode.languages.registerHoverProvider
  • vscode.window.createWebviewPanel
  • vscode.commands.registerCommand

🤝 Contributing

We welcome contributions! Please see our Contributing Guide for details.

Quick Contribution Steps

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Test thoroughly
  5. Submit a pull request

🐛 Issues

Found a bug or have a feature request? Please open an issue with:

  • Clear description of the problem
  • Steps to reproduce
  • Expected vs actual behavior
  • VS Code version and OS

📝 Changelog

See CHANGELOG.md for version history and release notes.

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgments

  • Lord Icons for providing the amazing icon library
  • Visual Studio Code for the excellent extension API
  • The open source community for inspiration and support

Made with ❤️ for the developer community

Report Bug · Request Feature · Contribute

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft