Chapter 5: Sizing
Core Idea
Learn how to adjust the size of Lucide icons in your Vanilla JavaScript applications using the width and height attributes and CSS.
Key Concepts
- Adjusting the icon size using the
width and height attribute
- Adjusting the icon size via CSS
Code Examples
<!DOCTYPE html>
<html>
<body>
<i data-lucide="landmark" width="64" height="64"></i>
<script src="index.js">
</script>
</body>
</html>
- What it demonstrates: Sizing usage pattern from the official Lucide docs.
Key Takeaways
- Adjusting the icon size using the
width and height attribute
- Adjusting the icon size via CSS
Connects To
- Vanilla JS (core): part of the Vanilla JS (core) section of the Lucide docs.
- Lucide for Vanilla JavaScript: overview page for this section.