Capítulo 88 de 147

Chapter 88: Combining icons

Core Idea

Learn how to combine multiple icons into a single icon nested SVG elements in your Preact application.

Key Concepts

  • With native SVG elements

Code Examples

import { Scan, User } from "lucide-preact";
import { h } from "preact";

function App() {
  return (
    <div className="app">
      <Scan size={48}>
        <User
          size={12}
          x={6}
          y={6}
          absoluteStrokeWidth
        />
      </Scan>
    </div>
  );
}

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

Key Takeaways

  1. With native SVG elements

Connects To

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