Giter Club home page Giter Club logo

iconify-prerendered's Introduction

Note

This project is mainrained by developer from Ukraine πŸ‡ΊπŸ‡¦

Due to the ongoing war resulting from Russia's full-scale invasion of Ukraine, I currently lack the time for the full development of this open-source project. My primary focus is on ensuring the well-being of myself and my family. I'll prioritize and review all new contributions as soon as possible.

If you can, please consider supporting Ukraine or me personally.

Thank you for your understanding and support.


@iconify-prerendered

A superset standalone icon-components for Vue with zero dependencies. Designed for ease of use and high performance.

Features

  • Easy to use
    • No plugins required! Compatible with any build tools.
    • Designed for best compatibility with IDE auto-completion (Demo).
    • Zero dependencies.
    • SSR / SSG friendly.
    • TypeScript support.
    • Unified API across all icon sets.
  • High performance
    • Does not require any external resources like fonts, css, images.
    • The icon code is embedded in your bundle.
    • Supports tree shaking, so only those icons that you have used will be included in the bundle.
    • Works offline.
  • Powered by iconify.

Live demo: https://stackblitz.com/edit/iconify-prerendered-demo?file=src%2FApp.vue

Installation

Install the appropriate icon set

npm i @iconify-prerendered/vue-<icon-set-name>

# Bootstrap Icons
npm i @iconify-prerendered/vue-bi

# Material Design Icons
npm i @iconify-prerendered/vue-mdi

Usage

Just import icon-component from set like usual.

<script setup>
// Import two icons from Font Awesome Brands
import { IconVuejs, IconJs } from '@iconify-prerendered/vue-fa-brands';
// Import one Icon from Material Design icons
import { IconCardsHeart } from '@iconify-prerendered/vue-mdi';
</script>

<template>
  <p>
    <IconJs />
    <IconCardsHeart />
    <IconVuejs />
  </p>
</template>

Only these three icons will be included in your bundle. All other icons may be tree-shaken by your bundler.

That's all you need. No plugins, extra configs, IDE extensions or something else.

Customizing icon default attributes

By default, all icons have only two attributes: role="img" and aria-hidden="true". While you are free to redefine these attributes or add new ones for each individual icon, you might want to apply certain attributes, such as class or style, to all icons within a set.

To achieve this, you can re-export icons through a new Proxy and include default attributes

import * as defaultIcons from '@iconify-prerendered/vue-mdi';

// accessing to icon through this Proxy will add additional attributes
export const themedIcons = new Proxy({} as typeof defaultIcons, {
  get(_, iconKey: keyof typeof defaultIcons) {
    return () =>
      defaultIcons[iconKey]({
        class: 'pre-defined-class',
        // ... any other attributes
      });
  },
});

Available icons sets

Icon set Package Last modified
Academicons @iconify-prerendered/vue-academicons Dec 11, 2023
Akar Icons @iconify-prerendered/vue-akar-icons Mar 22, 2024
Ant Design Icons @iconify-prerendered/vue-ant-design Apr 9, 2024
Arcticons @iconify-prerendered/vue-arcticons Apr 7, 2024
Basil @iconify-prerendered/vue-basil Dec 11, 2023
Bitcoin Icons @iconify-prerendered/vue-bitcoin-icons Jan 4, 2024
Bootstrap Icons @iconify-prerendered/vue-bi Jan 5, 2024
BoxIcons @iconify-prerendered/vue-bx Dec 11, 2023
BoxIcons Logo @iconify-prerendered/vue-bxl Dec 11, 2023
BoxIcons Solid @iconify-prerendered/vue-bxs Dec 11, 2023
BPMN @iconify-prerendered/vue-bpmn Dec 11, 2023
Brandico @iconify-prerendered/vue-brandico Dec 11, 2023
Bytesize Icons @iconify-prerendered/vue-bytesize Dec 11, 2023
Carbon @iconify-prerendered/vue-carbon Mar 4, 2024
Charm Icons @iconify-prerendered/vue-charm Dec 11, 2023
Circle Flags @iconify-prerendered/vue-circle-flags Apr 4, 2024
Circum Icons @iconify-prerendered/vue-circum Dec 11, 2023
Clarity @iconify-prerendered/vue-clarity Dec 11, 2023
Codicons @iconify-prerendered/vue-codicon Apr 4, 2024
coolicons @iconify-prerendered/vue-ci Dec 11, 2023
CoreUI Brands @iconify-prerendered/vue-cib Dec 11, 2023
CoreUI Flags @iconify-prerendered/vue-cif Dec 11, 2023
CoreUI Free @iconify-prerendered/vue-cil Dec 11, 2023
Covid Icons @iconify-prerendered/vue-covid Dec 11, 2023
Cryptocurrency Color Icons @iconify-prerendered/vue-cryptocurrency-color Dec 11, 2023
Cryptocurrency Icons @iconify-prerendered/vue-cryptocurrency Dec 11, 2023
css.gg @iconify-prerendered/vue-gg Dec 11, 2023
Custom Brand Icons @iconify-prerendered/vue-cbi Apr 4, 2024
Dashicons @iconify-prerendered/vue-dashicons Dec 11, 2023
Devicon @iconify-prerendered/vue-devicon Apr 7, 2024
Devicon Plain @iconify-prerendered/vue-devicon-plain Apr 7, 2024
Elegant @iconify-prerendered/vue-et Dec 11, 2023
Element Plus @iconify-prerendered/vue-ep Mar 11, 2024
Elusive Icons @iconify-prerendered/vue-el Dec 11, 2023
Emoji One (Colored) @iconify-prerendered/vue-emojione Dec 11, 2023
Emoji One (Monotone) @iconify-prerendered/vue-emojione-monotone Dec 11, 2023
Emoji One (v1) @iconify-prerendered/vue-emojione-v1 Dec 11, 2023
Entypo+ @iconify-prerendered/vue-entypo Dec 11, 2023
Entypo+ Social @iconify-prerendered/vue-entypo-social Dec 11, 2023
EOS Icons @iconify-prerendered/vue-eos-icons Dec 11, 2023
Eva Icons @iconify-prerendered/vue-eva Dec 11, 2023
Evil Icons @iconify-prerendered/vue-ei Dec 11, 2023
Feather Icon @iconify-prerendered/vue-fe Dec 11, 2023
Feather Icons @iconify-prerendered/vue-feather Dec 11, 2023
File Icons @iconify-prerendered/vue-file-icons Dec 11, 2023
Firefox OS Emoji @iconify-prerendered/vue-fxemoji Dec 11, 2023
Flag Icons @iconify-prerendered/vue-flag Apr 4, 2024
Flagpack @iconify-prerendered/vue-flagpack Jan 4, 2024
Flat Color Icons @iconify-prerendered/vue-flat-color-icons Dec 11, 2023
Flat UI Icons @iconify-prerendered/vue-flat-ui Dec 11, 2023
Flowbite Icons @iconify-prerendered/vue-flowbite Mar 14, 2024
Fluent Emoji @iconify-prerendered/vue-fluent-emoji Dec 11, 2023
Fluent Emoji Flat @iconify-prerendered/vue-fluent-emoji-flat Dec 11, 2023
Fluent Emoji High Contrast @iconify-prerendered/vue-fluent-emoji-high-contrast Dec 18, 2023
Fluent UI MDL2 @iconify-prerendered/vue-fluent-mdl2 Apr 7, 2024
Fluent UI System Icons @iconify-prerendered/vue-fluent Apr 7, 2024
Font Awesome 4 @iconify-prerendered/vue-fa Dec 11, 2023
Font Awesome 5 Brands @iconify-prerendered/vue-fa-brands Dec 11, 2023
Font Awesome 5 Regular @iconify-prerendered/vue-fa-regular Dec 11, 2023
Font Awesome 5 Solid @iconify-prerendered/vue-fa-solid Dec 11, 2023
Font Awesome Brands @iconify-prerendered/vue-fa6-brands Apr 4, 2024
Font Awesome Regular @iconify-prerendered/vue-fa6-regular Apr 4, 2024
Font Awesome Solid @iconify-prerendered/vue-fa6-solid Apr 4, 2024
Font-GIS @iconify-prerendered/vue-gis Apr 4, 2024
FontAudio @iconify-prerendered/vue-fad Dec 11, 2023
Fontelico @iconify-prerendered/vue-fontelico Dec 11, 2023
Fontisto @iconify-prerendered/vue-fontisto Dec 11, 2023
FormKit Icons @iconify-prerendered/vue-formkit Apr 9, 2024
Foundation @iconify-prerendered/vue-foundation Dec 11, 2023
Framework7 Icons @iconify-prerendered/vue-f7 Jan 5, 2024
Gala Icons @iconify-prerendered/vue-gala Nov 26, 2023
Game Icons @iconify-prerendered/vue-game-icons Apr 7, 2024
GeoGlyphs @iconify-prerendered/vue-geo Dec 11, 2023
Gitlab SVGs @iconify-prerendered/vue-pajamas Apr 7, 2024
Google Material Icons @iconify-prerendered/vue-ic Dec 11, 2023
Gravity UI Icons @iconify-prerendered/vue-gravity-ui Feb 29, 2024
Gridicons @iconify-prerendered/vue-gridicons Dec 11, 2023
Grommet Icons @iconify-prerendered/vue-grommet-icons Dec 11, 2023
Guidance @iconify-prerendered/vue-guidance Dec 11, 2023
Health Icons @iconify-prerendered/vue-healthicons Jan 10, 2024
HeroIcons @iconify-prerendered/vue-heroicons Dec 20, 2023
HeroIcons v1 Outline @iconify-prerendered/vue-heroicons-outline Dec 11, 2023
HeroIcons v1 Solid @iconify-prerendered/vue-heroicons-solid Dec 11, 2023
Humbleicons @iconify-prerendered/vue-humbleicons Apr 4, 2024
Icalicons @iconify-prerendered/vue-il Dec 11, 2023
IcoMoon Free @iconify-prerendered/vue-icomoon-free Dec 11, 2023
IconaMoon @iconify-prerendered/vue-iconamoon Dec 11, 2023
Iconoir @iconify-prerendered/vue-iconoir Apr 7, 2024
IconPark @iconify-prerendered/vue-icon-park Nov 26, 2023
IconPark Outline @iconify-prerendered/vue-icon-park-outline Dec 11, 2023
IconPark Solid @iconify-prerendered/vue-icon-park-solid Dec 11, 2023
IconPark TwoTone @iconify-prerendered/vue-icon-park-twotone Dec 11, 2023
Icons8 Windows 10 Icons @iconify-prerendered/vue-icons8 Dec 11, 2023
Icons8 Windows 8 Icons @iconify-prerendered/vue-wpf Dec 11, 2023
Innowatio Font @iconify-prerendered/vue-iwwa Dec 11, 2023
IonIcons @iconify-prerendered/vue-ion Mar 25, 2024
Jam Icons @iconify-prerendered/vue-jam Dec 11, 2023
Lets Icons @iconify-prerendered/vue-lets-icons Dec 11, 2023
Ligature Symbols @iconify-prerendered/vue-ls Dec 11, 2023
Line Awesome @iconify-prerendered/vue-la Dec 11, 2023
Lucide @iconify-prerendered/vue-lucide Apr 7, 2024
Mage Icons @iconify-prerendered/vue-mage Feb 24, 2024
Majesticons @iconify-prerendered/vue-majesticons Dec 11, 2023
Maki @iconify-prerendered/vue-maki Mar 4, 2024
Map Icons @iconify-prerendered/vue-map Dec 11, 2023
Marketeq @iconify-prerendered/vue-marketeq Apr 4, 2024
Material Design Iconic Font @iconify-prerendered/vue-zmdi Dec 11, 2023
Material Design Icons @iconify-prerendered/vue-mdi Apr 7, 2024
Material Design Light @iconify-prerendered/vue-mdi-light Dec 11, 2023
Material Line Icons @iconify-prerendered/vue-line-md Mar 22, 2024
Material Symbols @iconify-prerendered/vue-material-symbols Apr 7, 2024
Material Symbols Light @iconify-prerendered/vue-material-symbols-light Apr 7, 2024
Medical Icons @iconify-prerendered/vue-medical-icon Dec 11, 2023
Memory Icons @iconify-prerendered/vue-memory Jan 2, 2024
Meteocons @iconify-prerendered/vue-meteocons Dec 11, 2023
MingCute Icon @iconify-prerendered/vue-mingcute Mar 22, 2024
Mono Icons @iconify-prerendered/vue-mi Dec 11, 2023
Mono Icons @iconify-prerendered/vue-mono-icons Dec 11, 2023
Myna UI Icons @iconify-prerendered/vue-mynaui Mar 22, 2024
Nimbus @iconify-prerendered/vue-nimbus Dec 11, 2023
Nonicons @iconify-prerendered/vue-nonicons Dec 11, 2023
Noto Emoji @iconify-prerendered/vue-noto Dec 11, 2023
Noto Emoji (v1) @iconify-prerendered/vue-noto-v1 Dec 11, 2023
Octicons @iconify-prerendered/vue-octicon Apr 4, 2024
OOUI @iconify-prerendered/vue-ooui Mar 25, 2024
Open Iconic @iconify-prerendered/vue-oi Dec 11, 2023
OpenMoji @iconify-prerendered/vue-openmoji Feb 29, 2024
OpenSearch UI @iconify-prerendered/vue-oui Jan 23, 2024
Pepicons @iconify-prerendered/vue-pepicons Jan 2, 2023
Pepicons Pencil @iconify-prerendered/vue-pepicons-pencil Dec 11, 2023
Pepicons Pop! @iconify-prerendered/vue-pepicons-pop Dec 11, 2023
Pepicons Print @iconify-prerendered/vue-pepicons-print Dec 11, 2023
Phosphor @iconify-prerendered/vue-ph Apr 4, 2024
Pixelarticons @iconify-prerendered/vue-pixelarticons Apr 4, 2024
PrestaShop Icons @iconify-prerendered/vue-ps Dec 11, 2023
Prime Icons @iconify-prerendered/vue-prime Mar 22, 2024
Quill Icons @iconify-prerendered/vue-quill Dec 11, 2023
Radix Icons @iconify-prerendered/vue-radix-icons Dec 11, 2023
Raphael @iconify-prerendered/vue-raphael Dec 11, 2023
Remix Icon @iconify-prerendered/vue-ri Feb 26, 2024
Simple Icons @iconify-prerendered/vue-simple-icons Apr 7, 2024
Simple line icons @iconify-prerendered/vue-simple-line-icons Dec 11, 2023
Skill Icons @iconify-prerendered/vue-skill-icons Feb 21, 2024
SmartIcons Glyph @iconify-prerendered/vue-si-glyph Dec 11, 2023
Solar @iconify-prerendered/vue-solar Dec 11, 2023
Streamline @iconify-prerendered/vue-streamline Dec 11, 2023
Streamline Emojis @iconify-prerendered/vue-streamline-emojis Dec 11, 2023
Subway Icon Set @iconify-prerendered/vue-subway Dec 11, 2023
SVG Logos @iconify-prerendered/vue-logos Dec 27, 2023
SVG Spinners @iconify-prerendered/vue-svg-spinners Jan 15, 2023
System UIcons @iconify-prerendered/vue-system-uicons Dec 11, 2023
Tabler Icons @iconify-prerendered/vue-tabler Mar 18, 2024
TDesign Icons @iconify-prerendered/vue-tdesign Dec 11, 2023
Teenyicons @iconify-prerendered/vue-teenyicons Dec 11, 2023
Token Icons @iconify-prerendered/vue-token Apr 7, 2024
Token Icons Branded @iconify-prerendered/vue-token-branded Apr 9, 2024
TopCoat Icons @iconify-prerendered/vue-topcoat Dec 11, 2023
Twitter Emoji @iconify-prerendered/vue-twemoji Dec 11, 2023
Typicons @iconify-prerendered/vue-typcn Dec 11, 2023
uiw icons @iconify-prerendered/vue-uiw Dec 11, 2023
Unicons @iconify-prerendered/vue-uil Dec 11, 2023
Unicons Monochrome @iconify-prerendered/vue-uim Dec 11, 2023
Unicons Solid @iconify-prerendered/vue-uis Dec 11, 2023
Unicons Thin Line @iconify-prerendered/vue-uit Dec 11, 2023
UnJS Logos @iconify-prerendered/vue-unjs Mar 20, 2024
Vaadin Icons @iconify-prerendered/vue-vaadin Dec 11, 2023
Vesper Icons @iconify-prerendered/vue-vs Dec 11, 2023
VSCode Icons @iconify-prerendered/vue-vscode-icons Jan 15, 2024
Weather Icons @iconify-prerendered/vue-wi Dec 11, 2023
Web Symbols Liga @iconify-prerendered/vue-websymbol Dec 11, 2023
WebHostingHub Glyphs @iconify-prerendered/vue-whh Dec 11, 2023
Zondicons @iconify-prerendered/vue-zondicons Dec 11, 2023

License

The code for generating the icon sets is distributed under the MIT license. The icon sets themselves are distributed under the license of their author.

Development setup

  1. Install Deno.
  2. Run deno task generate for generate all collections. Params:
    • --version or -v specify version base for generated packages. Optional.
    • --prefix or -p specify with collection to generate. May be multiple times. Optional.
    • --no-replace-ids disable replacing ids. Required for test case. Optional.
    • --output or -o directory to place generated files. Optional.
  3. Run deno task test for run all tests. See more about test running.

Benchmarking

You can benchmark two version of icon sets. To do that:

  1. Generate baseline icon set by command: deno task generate -p=fluent-emoji -o=benckmarks/generated/baseline
  2. Make any changes to generation process or whatever
  3. Generate tested icon set by command: deno task generate -p=fluent-emoji -o=benckmarks/generated/test
  4. Run benchmark by deno bench --allow-env
  5. Go to step #2

iconify-prerendered's People

Contributors

cawa-93 avatar renovate[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

iconify-prerendered's Issues

Redeclaration of const components

Some sets have icons with similar names like below from mdi

"123": {
	"parent": "numeric"
},
"1-2-3": {
	"parent": "numeric"
},

This icons will be compilet to two component with same name:

export const Icon123 = {name: 'Icon123', setup() { return () => h('svg', {"xmlns":"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":true,"role":"img","innerHTML":"<path fill=\"currentColor\" d=\"M4 17V9H2V7h4v10H4m18-2a2 2 0 0 1-2 2h-4v-2h4v-2h-2v-2h2V9h-4V7h4a2 2 0 0 1 2 2v1.5a1.5 1.5 0 0 1-1.5 1.5a1.5 1.5 0 0 1 1.5 1.5V15m-8 0v2H8v-4a2 2 0 0 1 2-2h2V9H8V7h4a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2h-2v2h4Z\"/>","width":"24","height":"24","preserveAspectRatio":"xMidYMid meet","viewBox":"0 0 24 24"}) }};
export const Icon123 = {name: 'Icon123', setup() { return () => h('svg', {"xmlns":"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":true,"role":"img","innerHTML":"<path fill=\"currentColor\" d=\"M4 17V9H2V7h4v10H4m18-2a2 2 0 0 1-2 2h-4v-2h4v-2h-2v-2h2V9h-4V7h4a2 2 0 0 1 2 2v1.5a1.5 1.5 0 0 1-1.5 1.5a1.5 1.5 0 0 1 1.5 1.5V15m-8 0v2H8v-4a2 2 0 0 1 2-2h2V9H8V7h4a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2h-2v2h4Z\"/>","width":"24","height":"24","preserveAspectRatio":"xMidYMid meet","viewBox":"0 0 24 24"}) }};

what throw exeption:

SyntaxError: redeclaration of const Icon123

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Error type: Cannot find preset's package (:onlyNpm)

Error while using it with web pack 5

I've try using your components but have this issue:


ERROR in ./src/views/cmakelists-editor/components/ArrayElement.vue?vue&type=script&setup=true&lang=ts (./node_modules/ts-loader/index.js??clonedRuleSet-4.use!./node_modules/vue-loader/dist/index.js??ruleSet[1].rules[9].use[0]!./src/views/cmakelists-editor/components/ArrayElement.vue?vue&type=script&setup=true&lang=ts) 4:22-65
Module not found: Error: Package path . is not exported from package /Users/brainignacio/workspace/vscode-esp-idf-extension/node_modules/@iconify-prerendered/vue-codicon (see exports field in /Users/brainignacio/workspace/vscode-esp-idf-extension/node_modules/@iconify-prerendered/vue-codicon/package.json)
 @ ./src/views/cmakelists-editor/components/ArrayElement.vue?vue&type=script&setup=true&lang=ts 1:0-225 1:0-225 1:226-440 1:226-440
 @ ./src/views/cmakelists-editor/components/ArrayElement.vue 2:0-74 3:0-69 3:0-69 8:49-55
 @ ./node_modules/ts-loader/index.js??clonedRuleSet-4.use!./node_modules/vue-loader/dist/index.js??ruleSet[1].rules[9].use[0]!./src/views/cmakelists-editor/components/CMakeListsElement.vue?vue&type=script&setup=true&lang=ts 7:27-56
 @ ./src/views/cmakelists-editor/components/CMakeListsElement.vue?vue&type=script&setup=true&lang=ts 1:0-230 1:0-230 1:231-450 1:231-450
 @ ./src/views/cmakelists-editor/components/CMakeListsElement.vue 2:0-79 3:0-74 3:0-74 6:49-55
 @ ./node_modules/ts-loader/index.js??clonedRuleSet-4.use!./node_modules/vue-loader/dist/index.js??ruleSet[1].rules[9].use[0]!./src/views/cmakelists-editor/CmakeListsEditor.vue?vue&type=script&setup=true&lang=ts 7:32-77
 @ ./src/views/cmakelists-editor/CmakeListsEditor.vue?vue&type=script&setup=true&lang=ts 1:0-223 1:0-223 1:224-436 1:224-436
 @ ./src/views/cmakelists-editor/CmakeListsEditor.vue 2:0-78 3:0-73 3:0-73 8:49-55
 @ ./src/views/cmakelists-editor/main.ts 22:31-83

webpack 5.76.3 compiled with 1 error in 36364 ms
error Command failed with exit code 1.

Maybe there is some rule not working for webpack conditional syntax ?

EDIT: I've tried this and works:

"exports": {
    ".": {
      "types": "./index.d.ts",
      "default": "./index.js"
    }
  }

Apologies, no modification needed. just need to resolve it in webpack.config.js:

resolve: {
    conditionNames: ['import']
}

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

This repository currently has no open or pending branches.

Detected dependencies

github-actions
.github/workflows/publish.yml
  • actions/checkout v3
  • actions/setup-node v3
.github/workflows/tests.yml
  • actions/checkout v3
  • actions/setup-node v3
.github/workflows/update-packages-list.yml
  • actions/checkout v3
  • actions/setup-node v3
npm
package.json
  • @iconify/json 2.1.144
  • @iconify/utils 2.0.2
  • @japa/assert 1.3.6
  • @japa/runner 2.2.2
  • @japa/spec-reporter 1.3.2
  • @jsdevtools/npm-publish 1.4.3
  • esmock 2.0.8

  • Check this box to trigger a request for Renovate to run again on this repository

React support

Should I make same components superset for React?

[Feature request] Changing default size of SVGs

Thanks so much for these packages!

For my app, I would like to set a default width / height to 1.5em for icons. (It looks better / more balanced next to text because of glyph height, and Material Symbols actually uses this as its default size.) I thought about doing this:

/** Auto-size @iconify icons */
svg[role="img"][aria-hidden="true"] {
  height: 1.5em;
  width: 1.5em;
}

...But then I realized that I want to be able to override the size of the icons at will. In other words, I could pass in height / width values, but then they would be over-ridden.

The docs say:

By default, all icons have only two attributes: role="img" and aria-hidden="true"

But, at least in the case of the exported Material Symbols package, that's just not true. It has 3 additional attributes: width, height, and viewBox. I understand the necessity for viewBox, but not of height and width, because it makes setting defaults challenging (I'd prefer not to use a Proxy for every icon).

So, a few ideas:

  1. You could remove width / height. That makes it trivial to apply CSS to SVGs without height and width, and AFAIK, it should still auto-resize based on the viewBox dimensions; alternatively:
  2. You could dynamically add / remove an attribute based on passing in custom width / height props.
  3. You could allow extending icons without using a Proxy. (There are several methods that could achieve this.)

... or some other solution I'm not thinking of.

Additionally, could you possible export SVGs to have some label / identifier that associates them with iconify (to make those SVGs uniquely selectable)? I'm hesitant to stick with svg[role="img"][aria-hidden="true"] because there's no guarantee that other packages / SVGs won't have those attributes.

Thanks for considering.

[Request] Add Material Symbols outlined

Derp, I just realized I couldn't replace my Material Symbols icon font because I'm using the outline version. Can you add those, along with the different symbol weights?

Something like:

import { IconHelp } from '@iconify-prerendered/vue-material-symbols/400/outlined'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.