@preact-icons/common@1.1.0Built and signed on GitHub ActionsBuilt and signed on GitHub Actions
Built and signed on GitHub Actions
latest
UrielCh/react-iconscommon code for @preact-icons/* icons for Preact
This package works with Node.js, DenoIt is unknown whether this package works with Cloudflare Workers, Bun, Browsers




JSR Score
100%
Published
4 months ago (1.1.0)
preact version of react-icons
This library is preact version of react-icons build to be use with deno fresh project.
All icons available can be test here click on the icon you want the copy the import statement to your code.
If you have time to help the project is here
Setup
install the bundle you want using
deno add @preact-icons/ai
for deno
npx jsr add @preact-icons/ai
for npm
bunx jsr add @preact-icons/ai
for bun
update your dependency tu use only jsr / npm source
replace http imports like:
{ "preact": "https://esm.sh/preact@10.22.1", "preact/": "https://esm.sh/preact@10.22.1/" }
by npm imports like:
{ "preact": "npm:preact@10.22.1", "preact/jsx-runtime": "npm:preact@10.22.1/jsx-runtime", "preact/hooks": "npm:preact@10.22.1/hooks" }
you can now import a single icon using:
import AiTwotonePrinter from "@preact-icons/ai/AiTwotonePrinter";
sample
deno add @preact-icons/ai
import { AiFillAccountBook } from "@preact-icons/ai"; export default function TesSvg() { return <AiFillAccountBook />; }
Check the full documetation in: here
the first sample:
import { FaBeer } from "react-icons/fa"; class Question extends React.Component { render() { return ( <h3> Lets go for a <FaBeer />? </h3> ); } }
can be convert as:
import { FaBeer } from "@preact-icons/fa"; // or import FaBeer from "@preact-icons/fa/FaBeer"; import { Component } from "preact"; class Question extends Component { render() { return ( <h3> Lets go for a <FaBeer />? </h3> ); } }
references
- Original react-icons npm package.
- The R§eact-Icons doc
changelog
1.1.0
- allows class and classname attribute
Built and signed on
GitHub Actions
Add Package
deno add jsr:@preact-icons/common
Import symbol
import * as common from "@preact-icons/common";
Import directly with a jsr specifier
import * as common from "jsr:@preact-icons/common";
Add Package
pnpm i jsr:@preact-icons/common
pnpm dlx jsr add @preact-icons/common
Import symbol
import * as common from "@preact-icons/common";
Add Package
yarn add jsr:@preact-icons/common
yarn dlx jsr add @preact-icons/common
Import symbol
import * as common from "@preact-icons/common";
Add Package
vlt install jsr:@preact-icons/common
Import symbol
import * as common from "@preact-icons/common";
Add Package
npx jsr add @preact-icons/common
Import symbol
import * as common from "@preact-icons/common";
Add Package
bunx jsr add @preact-icons/common
Import symbol
import * as common from "@preact-icons/common";