Skip to main content
Home

Built and signed on GitHub Actions

common 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
It is unknown whether this package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
It is unknown whether this package works with Bun
It is unknown whether this package works with Browsers
JSR Score
100%
Published
4 months ago (1.1.0)

preact version of react-icons

JSR

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

changelog

1.1.0

  • allows class and classname attribute
Built and signed on
GitHub Actions

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@preact-icons/common

Import symbol

import * as common from "@preact-icons/common";
or

Import directly with a jsr specifier

import * as common from "jsr:@preact-icons/common";

Add Package

pnpm i jsr:@preact-icons/common
or (using pnpm 10.8 or older)
pnpm dlx jsr add @preact-icons/common

Import symbol

import * as common from "@preact-icons/common";

Add Package

yarn add jsr:@preact-icons/common
or (using Yarn 4.8 or older)
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";