Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@lil-icons/vue

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lil-icons/vue

SVG icons components for Vue

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

lil-icons

Demo

Installation

npm install @lil-icons/vue

or

yarn add @lil-icons/vue

Usage

  1. Wrap your app in LilIconsProvider:
<template>
  <div id="app">
    <LilIconsProvider>
        ...
    </LilIconsProvider>
  </div>
</template>

<script>
    import { LilIconsProvider } from '@lil-icons/vue';
    export default {
        name: 'app',
        components: {
            LilIconsProvider,
        },
    };
</script>
  1. Use icon as a common component:
<template>
    <div>
        <IconSuccess />
        ...
    </div>
</template>

<script>
    import { IconSuccess } from '@lil-icons/vue';
    export default {
        name: 'MyComponent',
        components: {
            IconSuccess,
        },
    };
</script>

You can declare props once in LilIconsProvider and they will be passed down to all the icons. It uses provide/inject API:

<LilIconsProvider color="green" width={64} height={64}>
  <IconSuccess /> // green 64x64
</LilIconsProvider>

Icon props have a higher priority than provider props:

<LilIconsProvider color="green">
  <IconSuccess color="red" /> // red
</LilIconsProvider>

You can inject values from provider in your custom components:

<script>
  export default {
    name: 'MyCustomIcon',
    inject: ['lilIconsColor', 'lilIconsWidth', 'lilIconsHeight'],
  };
</script>
);

Props

PropTypeRequired
colorStringNo
widthString or NumberNo
heightString or NumberNo

Keywords

FAQs

Package last updated on 20 Aug 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc