1.0.17 • Published 5 months ago

@yoosuf/icons v1.0.17

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

@yoosuf/icons

A comprehensive collection of SVG icons for Vue 3 applications, built with TypeScript and Vite. Each icon is optimized for Vue 3 and supports customization through props.

Features

  • 🎨 Customizable colors and sizes
  • 💪 TypeScript support
  • 🔧 Tree-shakeable
  • 🎯 ESM and UMD builds
  • 📦 Small bundle size
  • 🎉 Vue 3 compatible

Installation

npm install @yoosuf/icons

Usage

<template>
  <div>
    <ActivityIcon class="icon" :width="24" :height="24" fill="currentColor" />
    <UserIcon class="icon" :width="32" :height="32" fill="#FF5733" />
  </div>
</template>

<script setup lang="ts">
import { ActivityIcon, UserIcon } from '@yoosuf/icons';
</script>

<style scoped>
.icon {
  margin: 0 8px;
}
</style>

Props

Each icon component accepts the following props:

PropTypeDefaultDescription
widthString'24'Icon width
heightString'24'Icon height
fillString'currentColor'Fill color
strokeString'none'Stroke color
classString''CSS class
styleString''Inline styles
viewBoxString'0 0 24 24'SVG viewBox
ariaHiddenBooleantrueSets aria-hidden attribute

Local Development

Building the Package

  1. Clone the repository:
git clone https://github.com/yoosuf/icons.git
cd icons
  1. Install dependencies:
npm install
  1. Build the package:
npm run build

Local Testing with npm link

  1. In the icons package directory, create a global symlink:
cd /path/to/icons
npm link
  1. In your test project, link to the icons package:
cd /path/to/your-project
npm link @yoosuf/icons
  1. Import and use the icons in your project:
<template>
  <ActivityIcon width="32" height="32" fill="#42b883" />
</template>

<script setup lang="ts">
import { ActivityIcon } from '@yoosuf/icons';
</script>
  1. When making changes to the icons package:
cd /path/to/icons
npm run build  # Rebuild the package

Changes will be immediately reflected in your test project.

  1. To unlink when done testing:
# In your test project
npm unlink @yoosuf/icons

# In the icons package
npm unlink

Contributing

Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.

Issues and Support

If you find any bugs or have feature requests, please create an issue at GitHub Issues.

Repository

License

MIT © Yoosuf

1.0.17

5 months ago

1.0.0

5 months ago

0.0.32

5 months ago

0.0.34

5 months ago

0.0.23

5 months ago

0.0.35

5 months ago

1.0.7

5 months ago

0.0.5

5 months ago