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

rollup-plugin-vue3-svg-inline

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rollup-plugin-vue3-svg-inline

Import svg as a component in vue3

  • 0.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-66.67%
Maintainers
1
Weekly downloads
 
Created
Source

rollup-plugin-vue3-svg-inline

Import svg as a component in vue3

Example

// A vue component 
<template>
  <account class="svg-icon" v-if="icon === 'account'"></account>
  <sign class="svg-icon" v-if="icon === 'sign'"></sign>
  <setting class="svg-icon" v-if="icon === 'setting'"></setting>
</template>

<script>
import Account from './assets/account.svg?raw'
import Sign from './assets/sign.svg?raw'
import Setting from './assets/setting.svg?raw'
export default {
  props: ['icon'],
  components: {
    Account,
    Sign,
    Setting
  }
}
</script>

<style>
.svg-icon {
  width: 1em;
  height: 1em;
  vertical-align: middle;
  fill: currentColor;
  overflow: hidden;
}
</style>

FAQs

Package last updated on 08 May 2021

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