antfu / icones Goto Github PK
View Code? Open in Web Editor NEW⚡️ Icon Explorer with Instant searching, powered by Iconify
Home Page: https://icones.js.org
License: MIT License
⚡️ Icon Explorer with Instant searching, powered by Iconify
Home Page: https://icones.js.org
License: MIT License
https://icones.js.org/collection/logos
Chrome 103 on macOS 12.5
n/a
Thanks ton for icones, its awesome.
I know I can fork, customise & host, but while accessing it online, it will be very helpful for everyone to configure (persist in local-storage):
i-mdi:home
or icon-mdi:home
instead of just mdi:home
), so that we can paste straight in our appsHey @antfu, thank you so much for this project. This is so useful. 🚀
This is a suggestion to add a global search option that will show results across all icon packs for the given query. This will be handy to select an icon comparing across all the packs.
Thanks again.
There is a bug when trying to download a bag of icons as zip.
Browser is Chrome 84
Steps to reproduce:
And of course thanks for this project - it's wonderful 😃
`> [email protected] compile /Users/****/WWW/icones/electron
electron-webpack
Error: Cannot find entry file src/renderer/index.ts (or main.ts, or app.ts, or index.js, or main.js, or app.js)
at computeEntryFile (/Users//WWW/icones/node_modules/.pnpm/[email protected][email protected]/node_modules/electron-webpack/src/main.ts:389:11)
at WebpackConfigurator.configure (/Users//WWW/icones/node_modules/.pnpm/[email protected][email protected]/node_modules/electron-webpack/src/main.ts:222:29)
at configure (/Users/****/WWW/icones/node_modules/.pnpm/[email protected][email protected]/node_modules/electron-webpack/src/main.ts:376:10)
ERROR Command failed with exit code 1.`
I am definitely an icons lover. Thanks a lot for this project!
I browse the fluent-emoji and click load all, the page scrolls stutteringly and my Chrome will crash with out of memory.
Meanwhile browsing other grayscale icons, solid color icons, the experience is good!
In my experience, I use innerHTML to load many svg icons in a single page, then the page animation will also drop frames.
Apart of using virtual grid, I have no ideal to optimize.
So I'm asking here and listening for other inspiration!
Thank you!
Love the project! Just thought I'd request Tabler Icons to the list if you plan on adding more to the set.
Large icons are has become smaller than small icons.
When you click on a snippet like "SVG", that give you:
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--fa-solid" width="28" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 448 512"><path d="M240.971 130.524l194.343 194.343c9.373 9.373 9.373 24.569 0 33.941l-22.667 22.667c-9.357 9.357-24.522 9.375-33.901.04L224 227.495L69.255 381.516c-9.379 9.335-24.544 9.317-33.901-.04l-22.667-22.667c-9.373-9.373-9.373-24.569 0-33.941L207.03 130.525c9.372-9.373 24.568-9.373 33.941-.001z" fill="currentColor"></path></svg>
And we lost the license tracking,
But if y copy it from font awesome official website:
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!-- Font Awesome Pro 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) --><path d="M240.971 130.524l194.343 194.343c9.373 9.373 9.373 24.569 0 33.941l-22.667 22.667c-9.357 9.357-24.522 9.375-33.901.04L224 227.495 69.255 381.516c-9.379 9.335-24.544 9.317-33.901-.04l-22.667-22.667c-9.373-9.373-9.373-24.569 0-33.941L207.03 130.525c9.372-9.373 24.568-9.373 33.941-.001z"/></svg>
Here's a bunch of icons I'd love to see in icones: https://chakra-ui.com/docs/media-and-icons/icon#using-chakra-ui-icons
Anthony how did you manage to get vscode to recognize your types? I keep getting Property 'baseURI' does not exist on type 'Window & typeof globalThis
even though I have created window.d.ts
When copying an icon its width and height are like that:
width="1em" height="1em"
An option to copy it like that would be awesome.
width="16" height="16"
Motivation: When pasting that icon into Figma, it thinks its width and height as 1.
Hi there! Apologies in advance if this is irrelevant. I just really liked the look of the app. I was wondering did you use any theme out of the box of tailwind or did you handcraft it? Thanks.
Could you please consider auto update icon collections everyday? (if icons changed)
https://developer.mozilla.org/en-US/docs/Web/CSS/overflow#Values
overlay
Only supported in WebKit-based (e.g., Safari) and Blink-based (e.g., Chrome or Opera) browsers.
i'm using firefox, so i can't scroll down😢
This would be tremendously useful in powerpoint presentations, google docs, gmail, etc, here's some JS code which converts PNG to SVG (I can work on a PR in a bit):
function toPng(svgHTML) {
return new SvgToPngConverter().convert(
`data:image/svg+xml;base64,${btoa(svgHTML)}`
);
}
class SvgToPngConverter {
constructor() {
this._init = this._init.bind(this);
this._cleanUp = this._cleanUp.bind(this);
this.convertFromInput = this.convert.bind(this);
}
_init() {
this.canvas = document.createElement("canvas");
this.imgPreview = document.createElement("img");
this.imgPreview.style = "position: absolute; top: -9999px";
document.body.appendChild(this.imgPreview);
this.canvasCtx = this.canvas.getContext("2d");
}
_cleanUp() {
document.body.removeChild(this.imgPreview);
}
//Maybe take from viewbox or computed styles for width and height when copying?
convert(input, { width = 128, height = 128 } = {}) {
return new Promise((callback) => {
this._init();
let _this = this;
this.imgPreview.onload = function () {
const img = new Image();
_this.canvas.width = width;
_this.canvas.height = height;
img.crossOrigin = "anonymous";
img.src = _this.imgPreview.src;
img.onload = function () {
_this.canvasCtx.drawImage(img, 0, 0, width, height);
let imgData = _this.canvas.toDataURL("image/png");
if (typeof callback == "function") {
callback(imgData);
}
_this._cleanUp();
};
};
this.imgPreview.src = input;
});
}
}
size of SVG not increasing
First of all, really awesome repo :)
When I'm looking through a library, for example Font Awesome 5 Solid, I can't see which prefix to use with these icons:
So when I want to use abacus
, I need to search through the All category, which gives me the following tooltip, including the shown prefix:
It would be really nice to see the library prefix on the library page itself, or atleast within the tooltip like it is showing when searching through All.
I love to use this application for exploring icons, and use them through URL on Notion, for example
Being able to see and export icons in other colors would be pretty neat :]
The user should be able to:
It looks like vite-plugin-voie is no longer actively maintained. We should switch to vite-plugin-pages instead
https://icones.js.org/collection/ic?s=javascript
Chrome 103 on macOS 12.5
n/a
Although there are options to directly get various types of snippets including names and svg, it will be great if it can also have autogenerated snippets relating to their usage in Unplugin Icons
Something like this can be generated easily imo without much problem -
import IconAccountBox from '~icons/mdi/account-box';
When using unplugin-icons, my flow is:
<MdiLightAlarmPlus/>
Ideal flow would be:
MdiLightAlarmPlus
I'm open to making a PR for this, just wanted to ask before doing so to see if there would be a preferred implementation for it.
Just trying to find an icon in Material Design Icons with a keyword user
, but it showing unrelated results.
And I try to compare it with MDI Explorer and from the site https://materialdesignicons.com which get a better results.
Here is the screenshots.
You are planning to create electron client, instead of using electron, i would recommend you to use tauri.rs to build cross platform desktop application.
Main benefit of using tauri.rs is that it is built using rust so, performance is no issue, moreover the build (release) size of an electron app is too big.
Minimum size of electron varies from 50mb to 70mb as far as i have seem
But tauri gives u minimum size oh 600kb
I would also like to contribute if u use tauri 😁
http://govicons.io/ a whole bunch of font-awesome type icons for government use...
No response
No response
On Firefox, on most websites, it's possible to right click the search field and select "Add a Keyword for this search". Sites like IMDB, Youtube, Github etc.
This enables me to more start typing a search term right from my url bar:
More info: https://support.mozilla.org/en-US/kb/how-search-from-address-bar
I think this could be enabled by:
?q=searchterm
). Currently searching only works using: /apps/search/searchterm
. (I understand this is a big ask)<form action="/apps/">
element around the input field. This will make Firefox recognize it as a search.name="q"
for example.https://d33wubrfki0l68.cloudfront.net/css/df63ff0ba9fa2d267f10200f991187c694b39ef5/assets/index.178bdaef.css
Visit https://icones.js.org/
and find that the CSS file resource is missing and cannot be accessed
Hi antfu!
When selecting "all collections" and searching the UI thread is slow, correct me if I'm wrong, but it doesn't seem to be working as it should in this case, or should I increase the time?
Always with great tools! I admire you!
error with blank page on safari :
TypeError: Object.hasOwn is not a function. (In 'Object.hasOwn(r.prototype,n)', 'Object.hasOwn' is undefined)
run safari browser with the https://icones.js.org
OSX 10.14.6 / Safari 14.1.2
but work on opera, chrome and firefox mac
n/a
Hey @antfu 👋🏻
I made a VS Code extension to search and copy icons without leaving code editor. The extension renders a webview of a forked icones.netlify.app site.
Here's the source code for the extension. I would love to know your thoughts on this.
And here's the published extension: https://marketplace.visualstudio.com/items?itemName=afzalsayed96.icones
Problem
When visiting https://icones.js.org/collection/all the site never loads the icons and there is an error in the console.
It looks like this bug is due to a recent commit where the out dir for collections-meta.json
was changed from /public
to /src/data
. So when /collection/all
attempts to fetch collections-meta.json
it returns a 404.
See here:
87c9b53#diff-1b976065307aee449f4c628c5115b270fd2335428bb72ccb1f5a62a9233a30beR56-R58
Hello! Could you add tooltips when hovering over icons? I would just like to quickly see the name of the icon, without opening it separately by pressing and without being distracted from the rest of the icons. I'm talking about something like this is implemented in Material Design Icons:
Hy i like this project a lot but i ask if there is new icons and new style ⚡👋
Hey @antfu , I love this website!
Both https://icones.netlify.app and https://icones.js.org seem to be down, they are showing a blank screen. No errors in the console though, and the network requests seem to be ok.
Thanks!
It should convert kebab-case like stroke-width
to camelCase 🤔
Exporting an icon with the React TS option gave the following code.
<SVGSVGElement>
should be <SVGElement>
export function IconParkOutlineTeaDrink(props: SVGProps<SVGSVGElement>) {
return (
<svg width="1em" height="1em" viewBox="0 0 48 48" {...props}><g fill="none" stroke="currentColor" strokeWidth="4" strokeLinecap="round" strokeLinejoin="round"><path clipRule="evenodd" d="M2 20c0 12.15 6 22 18 22s18-9.85 18-22H2z"></path><path d="M20 14V6"></path><path d="M30 14v-4"></path><path d="M10 14v-4"></path><path d="M36.19 30.623c.99-2.584 1.574-5.486 1.752-8.572c.345-.034.698-.051 1.058-.051c3.866 0 7 2.015 7 4.5S42.866 31 39 31c-1 0-1.95-.135-2.81-.377z"></path></g></svg>
)
}
It appears Mono Icons were added twice: in mi.json and mono-icons.json: iconify/icon-sets#21
To fix that issue, I've added hidden
boolean property to IconifyInfo
type (types and info conversion function in utils have been updated as well) and latest version of @iconify/json
package contains hidden
property for mono-icons:
"mono-icons": {
"name": "Mono Icons",
"total": 180,
"author": "Mono",
"url": "https://github.com/mono-company/mono-icons",
"license": "MIT",
"licenseURL": "https://github.com/mono-company/mono-icons/blob/master/LICENSE.md",
"height": 24,
"samples": [
"user",
"log-in",
"play"
],
"version": "1.3.1",
"palette": "Colorless",
"category": "General",
"hidden": true
},
So icon set is still there to avoid breaking people's UI, but it is hidden so it no longer should appear in icon sets list.
Right now we obviously have a way to search through all icons which works great. Sometimes though you might also want to look for icon packs, for example if you limit your design system to only a few packs, want to quickly lookup the prefix of a pack, or have a general idea of how the pack is called but don't know its exact name, etc. Currently though the Icon packs seem to be sorted in a completely arbitrary order, so finding a specific one gets annoying.
Sort the icon packs in both the home view and the sidebar in alphabetical order. Could also go further and add a setting for a "sort mode" where you could set the way icon packs should be ordered (e.g. by name, size, etc.), similar to how there is a "Size" display option for icons.
You could use the browser built-in search (CTRL-F
) but that gets finnicky, plus it wouldn't really help if you don't know a packs' exact name.
No response
The OpenSearch description format lets a website describe a search engine for itself, so that a browser or other client application can use that search engine. OpenSearch is supported by (at least) Firefox, Edge, Internet Explorer, Safari, and Chrome.
More info: https://developer.mozilla.org/en-US/docs/Web/OpenSearch
Beautiful app 😍 Are there any plans for SVG sprites with <symbol>
tags, like IcoMoon has?
There would be a few ways to do this:
This should probably do the trick though:
const dynamicCacheName = 'site-dynamic-v1';
const assets = [/* All static assets, like styles, HTML pages, etc here */]
// activate event
self.addEventListener('activate', evt => {
evt.waitUntil(
caches.open(dynamicCacheName).then((cache) => {
cache.addAll(assets);
})
);
evt.waitUntil(
caches.keys().then(keys => {
return Promise.all(keys
.filter(key => key !== dynamicCacheName)
.map(key => caches.delete(key))
);
})
);
});
// fetch event
self.addEventListener('fetch', evt => {
evt.respondWith(
caches.match(evt.request).then(cacheRes => {
return cacheRes || fetch(evt.request).then(fetchRes => {
return caches.open(dynamicCacheName).then(cache => {
cache.put(evt.request.url, fetchRes.clone());
return fetchRes;
})
});
})
);
});
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.