@marvin-recruiter/icons

`@marvin-recruiter/icons` is a Vue plugin that provides an `MvIcon` component for displaying icons. It also offers an icon registry for easy icon management.
25,443
Install
npm install @marvin-recruiter/icons
Latest Version:1.0.10
Vue:3
License:ISC
Last Updated:Jun 10, 2024
Links: GitLab  ·  npm
Maintainer: marvin-recruiter

@marvin-recruiter/icons

@marvin-recruiter/icons is a Vue plugin that provides an MvIcon component for displaying icons. It also offers an icon registry for easy icon management.

Installation

You can install the @marvin-recruiter/icons Vue Plugin using npm or yarn:

pnpm install @marvin-recruiter/icons
# or
yarn add @marvin-recruiter/icons

Usage

To use the MvIcon component, import it in your Vue application and include it in your template.

<template>
  <div>
    <MvIcon icon="example-icon" size="30" />
  </div>
</template>

<script>
import { MvIcon } from '@marvin-recruiter/icons';

export default {
  components: {
    MvIcon,
  },
};
</script>

You can also provide icons to the plugin for use in your application. First, make sure you have SVG icons in your project's ./assets/icons directory.

Then, install the @marvin-recruiter/icons Vue Plugin and provide the icons in your main application file.

// main.js
import { createApp } from 'vue';
import App from './App.vue';
import MvRecruiterIcons from '@marvin-recruiter/icons';

const app = createApp(App);

app.use(MvRecruiterIcons);

app.mount('#app');

This will provide your application with the MvIcon component and make the icons available for use.

Icon Management

Icons are automatically registered based on the filenames in the ./assets/icons directory. Filenames are used as the icon names without extensions. For example, example-icon.svg becomes example-icon.

To use an icon, simply pass its name as a prop to the MvIcon component.

License

The @marvin-recruiter/icons plugin is open-source and available under the MIT License. You are free to use, modify, and distribute it as needed.

Version History

Version Released Vue License
1.0.10 ^3.3.4 ISC
1.0.9 ^3.3.4 ISC
1.0.8 ^3.3.4 ISC
1.0.7 ^3.3.4 ISC
1.0.6 ^3.3.4 ISC