smithery.ai

lucide-icons

Guide for using Lucide icons in WinnetouJs constructos. Use this skill when you need to add icons to your UI components.

First seen Mar 28, 2026

Installation

$ npx skills add https://smithery.ai

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from smithery.ai · top by installs.

npx skills add https://smithery.ai

Browse all from smithery.ai

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 1,529 B
  • docs SUMMARY.md 140 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 2 installs

SKILL.md

RULES:

  • install: lucide
  • import only needed icons (tree-shake)
  • create icon HTML via createElement(Icon).outerHTML
  • pass icon HTML string to constructo prop
  • use CSS for color (icons inherit text color)
  • for SSR use lucide-static

BASIC:

import { createElement, Home } from "lucide";

const homeIcon = createElement(Home, { size: 20 }).outerHTML;
<winnetou>
  <span class="icon">{{icon}}</span>
</winnetou>
new $navItem({ icon: homeIcon, text: "Home" }).create("#menu");

ICON CUSTOM:

const alertIcon = createElement(AlertCircle, {
  size: 18,
  strokeWidth: 2,
  color: "#e74c3c",
}).outerHTML;

CSS COLOR:

.icon svg {
  width: 1em;
  height: 1em;
}
.icon-danger {
  color: #e74c3c;
}

LIBRARY PATTERN:

import { createElement, Home, Settings } from "lucide";

export const icons = {
  home: (s = 20) => createElement(Home, { size: s }).outerHTML,
  settings: (s = 20) => createElement(Settings, { size: s }).outerHTML,
};

SSR:

// Node
const { Home } = require("lucide-static");
const icon = Home; // raw SVG string

BEST PRACTICES:

  • cache icon HTML if reused
  • keep sizes consistent
  • provide labels for icon-only buttons

TROUBLESHOOT:

  • icon missing: use .outerHTML
  • wrong prop: ensure {{icon}} matches prop name
  • color wrong: set parent color or .icon svg