Capítulo 2 de 147
This guide will help you get started with Lucide in your Vanilla JavaScript project.
nameAttr to adjust the attribute name to replace icons (default is data-lucide).attrs to pass additional custom attributes, for instance CSS classes or stroke options.root to provide a custom DOM element the icons should be replaced in (useful when manipulating small sections of a large DOM or elements in the shadow DOM)inTemplates: true to also replace icons inside <template> tags.
<script src="https://unpkg.com/lucide@latest/dist/umd/lucide.js"></script>
<script src="https://unpkg.com/lucide@latest"></script>
nameAttr to adjust the attribute name to replace icons (default is data-lucide).attrs to pass additional custom attributes, for instance CSS classes or stroke options.root to provide a custom DOM element the icons should be replaced in (useful when manipulating small sections of a large DOM or elements in the shadow DOM)inTemplates: true to also replace icons inside <template> tags.