Capítulo 79 de 147

Chapter 79: Color

Core Idea

Learn how to adjust the color of icons in your Preact application using the color prop or by using parent elements text color value.

Key Concepts

  • Adjust the color using the color prop
  • Using parent elements text color value

Code Examples

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

function App() {
  return (
    <div className="app">
      <Smile color="#3e9392" />
    </div>
  );
}

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

Key Takeaways

  1. Adjust the color using the color prop
  2. Using parent elements text color value

Connects To

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