Appearance
在 Node.js 中使用 Lucide
🌐 Use Lucide in Node.js
你也可以在 Node.js 项目中使用 lucide-static 包导入 Lucide 图标。每个图标都作为包含 SVG 标记的字符串导出,可用于服务器端渲染或静态站点生成。
🌐 You can also import Lucide icons in Node.js projects, with the lucide-static package. Each icon is exported as a string containing the SVG markup, which can be used in server-side rendering or static site generation.
js
import {MessageSquare} from 'lucide-static';js
const {MessageSquare} = require('lucide-static');注意:每个图标名称都是 PascalCase。你可以在 Lucide 图标页面 找到图标名称。
Node.js 示例
🌐 Example with Node.js