Hand drawn icons for Preact
Preact components at 467 bytes an icon, with the API unchanged from the React target.
npm i @sketchyicons/preact- One icon
- 467 B
- Peers
- preact@^10
- Runtime dependencies
- none
- Shape
- one per icon
In your code
React rewrites camel case attributes into SVG's own spelling and Preact does not, so the factory writes stroke-width on the element directly. The prop you pass is still strokeWidth, which keeps the call site identical to every other target.
import { House, Star } from "@sketchyicons/preact";
<House size={20} />
<Star size={15} color="#2B2521" strokeWidth={1.75} fill="currentColor" />- size
- number defaults to 24
- color
- string defaults to currentColor
- strokeWidth
- number defaults to 2
- absoluteStrokeWidth
- boolean defaults to false
- fill
- string defaults to none
Coming from lucide-preact
The geometry here is derived from Lucide, so the names match and the props match. The 247 names Lucide has renamed are exported next to the current ones, which means Home and HelpCircle keep resolving after the swap.
-import { House } from "lucide-preact";
+import { House } from "@sketchyicons/preact";Nothing else at the call site moves. Sizes, colours and stroke widths keep the values you already wrote.
1500+ glyphs, and a page for each of them
Every glyph in the set has its own page with the code for Preact, the sizes it holds at, and the file. Here are twelve of the 1756, drawn by the same generator that built the package.
Search the whole set by name or by tag, or read the installation guide for the peer dependencies and the first icon on screen. Every glyph holds at 15 px, which is the size a real control uses.
The other targets
Why two of them package their icons differently is worked through in One component per icon, except when that is the wrong shape.