Capítulo 81 de 147

Chapter 81: Stroke width

Core Idea

Learn how to adjust the stroke width of icons in your Preact application using the strokeWidth prop or adjust the strokeWidth appearance using the absoluteStrokeWidth prop.

Key Concepts

  • Adjusting stroke width with strokeWidth prop
  • Absolute stroke width

Code Examples

import { h } from "preact";
import { FolderLock } from "lucide-preact";

function App() {
  return (
    <div className="app">
      <FolderLock strokeWidth={1} />
    </div>
  );
}

export default App;
  • What it demonstrates: Stroke width usage pattern from the official Lucide docs.

Key Takeaways

  1. Adjusting stroke width with strokeWidth prop
  2. Absolute stroke width

Connects To

  • Preact: part of the Preact section of the Lucide docs.
  • Lucide for Preact: overview page for this section.