GithubHelp home page GithubHelp logo

janosh / svicons Goto Github PK

View Code? Open in Web Editor NEW
13.0 3.0 2.0 3.36 MB

35 SVG Icon Packs as Svelte Components

Home Page: https://npmjs.com/org/svicons

License: MIT License

HTML 4.18% JavaScript 30.33% Shell 14.02% Svelte 43.45% CSS 3.24% TypeScript 4.78%
svelte svg-icons icon-packs sveltekit material-icons fa-icons

svicons's People

Contributors

benmccann avatar janosh avatar pre-commit-ci[bot] avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

svicons's Issues

"Cannot find module" in VSCode

Getting "Cannot find module '@svicons/ionicons-solid/trophy.svelte' or its corresponding type declarations.ts(2307)" on:

<script lang="ts">
  import Trophy from '@svicons/ionicons-solid/trophy.svelte';
</script>

In VSCode despite the icon actually working when doing <Trophy/>. I installed it with npm i -D @svicons/ionicons-solid.

Not sure if this is something you can fix, but perhaps it's an issue with the way you're exporting the icons in the js/ts files.

Why deviate from svelte-icons?

Hey! I'm looking for a suitable icon package and was wondering why you decided to create these standalone packages in addition to svelte-icons. Could you explain your rationale? (And maybe add it to the README). Thanks.

Merge "outline", "solid" etc

I was wondering if you would consider merging the different icon styles into one package per icon pack. For example you would do:

<script lang="ts">
import Trophy from '@svicons/ionicons/trophy.svelte';
</script>

<Trophy style="solid" width="38px" height="38px" color="black"/>
<Trophy style="outline" width="20px" height="20px" color="red"/>

Global styling options?

Hi Janosh,

Would it be possible to add a class or attribute to target custom styling so for example I could make all icons a certain size and colour which could then be overridden by local svelte module styles or the existing colour and width parameters. I can do this:

 <Alarm/>

<style>
  :global(svg){
      margin: 1rem;
      width: 2rem;
      color: red;
  }
</style>

but I'd like to be able to be more specific, eg:

<style>
  :global(svg.svicon){
      margin: 1rem;
      width: 2rem;
      color: red;
  }
</style>

to avoid interfering with other svgs that may be on the same page.

Invalid packaging

Someone just reported an error using @svicons/ionicons-outline in the SvelteKit Discord. I expect the issue is that it has:

  "module": "./index.js",
  "type": "module",

That's not valid because both the main and svelte fields are missing. You don't need module if you have "type": "module". I'd suggest updating it to:

  "type": "module",
  "main": "./index.js",
  "svelte": "./index.js",

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.