Skip to content

coderminer/cmicons

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

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy