Lucide Icons for Zed brings the entire Lucide icon library into the Zed Assistant. Search icons, browse curated lists, and grab framework-specific snippets without leaving your editor.
/lucide-search β Search all icons with multi-framework examples/lucide-browse β Browse curated icon categories/lucide-react β Get React-specific code for any icon/lucide-svelte β Get Svelte 5-specific code for any icon/lucide-vue β Get Vue 3-specific code for any icon/lucide-html β Get vanilla HTML/JavaScript code for any iconβ οΈ Note: Not Available on Marketplace
This extension is not available on the Zed Extensions Gallery. As noted in PR #3670, slash commands are intended for providing context to AI agents, not for general utility features like icon insertion. This extension will be reconsidered if/when Zed's extension API expands to support custom palette actions, keybindings, and direct buffer edits.
Manual Installation (Required)
git clone https://github.com/Michael-Obele/lucide-icons.git.cargo build --release.zed: install dev extension (via command palette) and select the project folder.π Important: Text Threads Only
These slash commands only work in text threads within Zed's Agent Panel. Text threads are an editor-based interface for conversing with language models, where you can use slash commands to enhance your AI interactions.
To use Lucide icon commands:
- Open the Agent Panel with
Cmd+J(Ctrl+Jon Linux/Windows)- Start a new text thread or open an existing one
- Type
/at the beginning of a line to see all available slash commands- Select any Lucide command (e.g.,
/lucide-search,/lucide-react) from the listWhat are text threads? Text threads in the Agent Panel work like a regular editor with message blocks for "You", "Assistant", and "System" roles. You can edit messages, use multiple cursors, and insert slash commands to add dynamic content like icon code snippets.
π Learn more: Text Threads Documentation
/lucide-search <icon-name> β Search for an icon and get code examples for all frameworks/lucide-browse β Browse popular icons organized by category/lucide-react <icon-name> β React-only code with hooks, styling, and interaction examples/lucide-svelte <icon-name> β Svelte 5-only code with runes ($state, $derived) examples/lucide-vue <icon-name> β Vue 3-only code with Composition API examples/lucide-html <icon-name> β Vanilla HTML/JavaScript with CDN and raw SVG optionsTab Completion: All commands support tab completion β start typing an icon name to see suggestions with related tags.
# Get all framework examples for a home icon
/lucide-search home
# Get only React code for a trash icon
/lucide-react trash
# Get only Svelte code for a user icon
/lucide-svelte user
# Browse all available icons by category
/lucide-browse
// React
import { Home } from "lucide-react";
export function Header() {
return <Home size={24} strokeWidth={1.5} />;
}
<script>
import { Home } from "@lucide/svelte";
let iconSize = $state(24);
</script>
<Home size="{iconSize}" />
<template>
<Home :size="24" :stroke-width="1.5" />
</template>
<script setup>
import { Home } from "lucide-vue-next";
</script>
<i data-lucide="home" data-lucide-size="24" data-lucide-stroke-width="1.5"></i>
<script src="https://unpkg.com/lucide@latest"></script>
<script>
lucide.createIcons();
</script>
While slash commands provide the fastest workflow, you can optionally install code snippets for traditional autocomplete-style usage (e.g., type luc β get completions).
Note: This requires manual installation and won't auto-update with the extension. We recommend using slash commands for the best experience.
The commands below will overwrite any existing snippet files (e.g., javascript.json, typescript.json, etc.).
Before installing, check if you have existing snippets:
ls ~/.config/zed/snippets/
If you see files like javascript.json, typescript.json, etc., you have existing snippets that will be replaced.
macOS:
cp -r ~/Library/Application\ Support/Zed/extensions/installed/lucide-icons/snippets/* ~/.config/zed/snippets/
Linux:
cp -r ~/.local/share/zed/extensions/installed/lucide-icons/snippets/* ~/.config/zed/snippets/
macOS:
# Backup existing snippets
cp -r ~/.config/zed/snippets ~/.config/zed/snippets.backup
# Install Lucide snippets
cp -r ~/Library/Application\ Support/Zed/extensions/installed/lucide-icons/snippets/* ~/.config/zed/snippets/
Linux:
# Backup existing snippets
cp -r ~/.config/zed/snippets ~/.config/zed/snippets.backup
# Install Lucide snippets
cp -r ~/.local/share/zed/extensions/installed/lucide-icons/snippets/* ~/.config/zed/snippets/
After installation, restart Zed or reload the window for snippets to take effect.
Once installed, you can use these prefixes in your code:
luc, luci, lucic, lucm, luct (TypeScript only)luc, luci, lucic, lucm, lucaluc, luci, lucic, lucm, lucvluc, luci, luccdn, lucsvgwasm32-wasip1 target (rustup target add wasm32-wasip1).cargo build --releasetarget/wasm32-wasip1/release/lucide_icons.wasmzed: open log inside Zed or launch Zed with zed --foreground for verbose output.Contributions are welcome! See CONTRIBUTING.md for detailed guidelines on:
Automated Versioning: Commits to main with [patch], [minor], or [major] tags automatically bump the version, update the changelog, and create releases.
MIT License β see LICENSE for details.