npm.io
1.0.11 • Published 5 years ago

octicons-vue

Licence
MIT
Version
1.0.11
Deps
1
Size
7 kB
Vulns
0
Weekly
0

Vue Octicons

Installation & Usage

NPM

npm install --save octicons-vue
# or with yarn
yarn add octicons-vue
A single octicon
<script>
const { Octicon, markGithub } = require('octicons-vue')
// import Octicon, { markGithub } from 'octicons-vue'

new Vue({
  el: '#app',
  components: { Octicon },
  data: {
    markGithub
  }
})
</script>
<template>
  <Octicon :icon="markGithub" />
</template>
All octicons
<script>
const { Octicon, Octicons } = require('octicons-vue')
// import Octicon, { Octicons } from 'octicons-vue'

new Vue({
  el: '#app',
  components: { Octicon },
  data: {
    Octicons
  }
})
</script>
<template>
  <Octicon :icon="Octicons.alert" />
</template>
API
Props
  • icon (object) - Octicon from octicons-modular library
  • scale (number) - Scale
    • Default: 1
  • className (string) - Additional classes
    • Default: null
  • label (string) - Label
    • Default: null
<Octicon :icon="icon" :scale="1" className="additional-class" label="another label" />

Development & Testing

Please check the Contributing Guidelines.

Contribution

Issues and PRs are welcome !

Keywords