Capítulo 61 de 147

Chapter 61: Global Styling

Core Idea

Learn how to style all Lucide icons globally in your Solid application using CSS or the Lucide context provider.

Key Concepts

  • The color of the icons can be changed using the color CSS property.
  • The size of the icons can be changed using width and height CSS properties.
  • The stroke width of the icons can be changed using the stroke-width CSS property.

Code Examples

import { LucideProvider, Home } from 'lucide-solid';

const App = () => (
  <LucideProvider
    color="red"
    size={48}
    strokeWidth={2}
  >
    <Home />
  </LucideProvider>
);
  • What it demonstrates: Global Styling usage pattern from the official Lucide docs.

Key Takeaways

  1. The color of the icons can be changed using the color CSS property.
  2. The size of the icons can be changed using width and height CSS properties.
  3. The stroke width of the icons can be changed using the stroke-width CSS property.

Connects To

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