Skip to content
coderminerPublic

About

Collection Open Source svg icons and generate react vue component

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Repository files navigation

Basic Usage

Collection Open source Svg icons and generate React Vue component, now collect jamicons humbleicons

使用说明

Vue

Note that this library currently only supports Vue 3.

First, install cmicons-vue from npm:

npm install cmicons-vue

Now each icon can be imported individually as a Vue component:

<template>
  <div>
    <SearchIcon style="color:red"/>
    <p>...</p>
  </div>
</template>

<script>
import { SearchIcon } from 'cmicons-vue/jam'

export default {
  components: { SearchIcon }
}
</script>
<template>
  <div>
    <SearchIcon style="color:red"/>
    <p>...</p>
  </div>
</template>

<script>
import { SearchIcon } from 'cmicons-vue/humble'

export default {
  components: { SearchIcon }
}
</script>

React

First, install cmicons-react from npm:

npm install cmicons-react

Now each icon can be imported individually as a React component:

import { SearchIcon } from 'cmicons-react/jam'

function MyComponent() {
  return (
    <div>
      <SearchIcon />
      <p>...</p>
    </div>
  )
}
import { SearchIcon } from 'cmicons-react/humble'

function MyComponent() {
  return (
    <div>
      <SearchIcon />
      <p>...</p>
    </div>
  )
}

License

This library is MIT licensed.

About

Collection Open Source svg icons and generate react vue component

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages