@i316/lucide-web
v0.1.0
Published
i316: Lucide icons as a web component, raw SVGs and search metadata. No build step needed.
Maintainers
Readme
@i316/lucide-web
i316: Lucide icons for plain HTML, with no build step: a <lucide-icon> web component, the raw SVG files, and search metadata. 2,194 icons in 2 styles: linear (default), outlined.
Using a framework? Install its package instead: @i316/lucide-react (React web), @i316/lucide-react-native (React Native), @i316/lucide-vue (Vue 3), @i316/lucide-angular (Angular).
Web component
<script type="module" src="/vendor/lucide-web/web-component.js"></script>
<lucide-icon name="chevron-down"></lucide-icon>
<lucide-icon name="bell" variant="outlined" size="20" color="#e11d48" title="Notifications"></lucide-icon>Serve the package folder from any static host (or a public CDN such as jsDelivr or unpkg). Each icon's SVG is fetched once, on first use, from the package's svg/ folder, which the script locates relative to its own URL. So a page only downloads the icons it shows. To serve the SVGs from elsewhere:
import { LucideIconElement } from '/vendor/lucide-web/web-component.js';
LucideIconElement.setBaseUrl('https://assets.example.com/lucide/');With a bundler, import '@i316/lucide-web'; registers the element. Copy the package's svg/ folder to your static assets, then point setBaseUrl at it.
Attributes: name, variant (style, default linear), size (number = px, or any CSS length), color, stroke-width, title. Page-wide defaults come from CSS:
:root { --lucide-icon-size: 20px; --lucide-icon-stroke-width: 2; }
.toolbar { color: slategray; } /* icons follow the CSS color */Accessibility: icons are decorative by default. A title attribute gives the element role="img" and an aria-label.
Raw SVGs
svg/<style>/<name>.svg (e.g. svg/linear/chevron-down.svg), with the icon color set to currentColor. Use them in <img>, inline them, or feed them to your own tooling.
Metadata
meta.json lists every icon's name, component name, categories, available styles and search tags. Use it to build an icon picker or search.
License
Icons: Lucide Icons and Contributors (icons derived from Feather by Cole Bemis are MIT) (https://github.com/lucide-icons/lucide), licensed under ISC (and MIT for icons derived from Feather). i316 modified them: default stroke width changed from 2 to 1.5; the "outlined" style is generated from the original strokes by stroke-to-fill tracing; reformatted and grouped into folders by each icon's primary upstream category; converted into React, React Native, Vue, Angular and web-component formats.
i316 code (components, runtime, tooling): MIT, © 2026 rahil316. See LICENSE for both licenses in full.
