modern-3d-icons-vue
v0.1.1
Published
A Vue 3 library for modern 3D SVG icons
Maintainers
Readme
Modern 3D Icons Vue
A Vue 3 library featuring modern 3D PNG icons with responsive sizing and high-quality assets.
Features
- 🎨 High-quality 3D PNG icons
- 📱 Responsive sizing with automatic resolution selection
- 🎯 TypeScript support
- 🚀 Vue 3 composition API
- 📦 Tree-shakeable imports
- ♿ Accessibility support with alt text
- 🎯 Zero dependencies
Installation
npm install modern-3d-icons-vue
# or
yarn add modern-3d-icons-vue
# or
pnpm add modern-3d-icons-vueUsage
Basic Usage
<template>
<AiChipIcon />
<AirplaneIcon />
<BellIcon />
<BookIcon />
<BookmarkIcon />
<BoxIcon />
<DigitalQuaverIcon />
<FootballIcon />
<MagnifyingGlassIcon />
<SpeakerIcon />
<WalletIcon />
</template>
<script setup>
import {
AiChipIcon,
AirplaneIcon,
BellIcon,
BookIcon,
BookmarkIcon,
BoxIcon,
DigitalQuaverIcon,
FootballIcon,
MagnifyingGlassIcon,
SpeakerIcon,
WalletIcon
} from 'modern-3d-icons-vue'
</script>Customizing Icons
All icons accept the following props:
<template>
<AiChipIcon
:size="32" <!-- Size in pixels (default: 32) -->
alt="AI Chip" <!-- Alt text for accessibility -->
/>
</template>Responsive Sizing
The icons automatically use the appropriate resolution based on their size:
- ≤ 64px: Uses 64x64 PNG
- 65-128px: Uses 128x128 PNG
128px: Uses 256x256 PNG
Available Icons
AiChipIcon- AI chip with golden prongs and starsAirplaneIcon- Commercial airplaneBellIcon- Minimalist bellBookIcon- Embossed book with red bookmarkBookmarkIcon- Minimalist bookmarkBoxIcon- Shipping box with handling symbolsDigitalQuaverIcon- 3D digital quaver music noteFootballIcon- American football close-upMagnifyingGlassIcon- 3D magnifying glassSpeakerIcon- 3D speaker with sound wavesWalletIcon- Beige wallet with blue banknote
Additional Image Attributes
You can pass any valid image attributes to the icons:
<template>
<AiChipIcon
class="my-icon"
style="opacity: 0.8"
alt="AI Chip"
/>
</template>Project Structure
modern-3d-icons-vue/
├── src/
│ ├── assets/
│ │ └── png/ # Icon assets in different resolutions
│ │ ├── 64/ # 64x64 icons
│ │ ├── 128/ # 128x128 icons
│ │ └── 256/ # 256x256 icons
│ ├── components/ # Vue components
│ └── index.ts # Main entry point
├── example-app/ # Example application
├── dist/ # Build output
└── package.jsonDevelopment
Prerequisites
- Node.js 16+
- npm 7+ or yarn 1.22+ or pnpm 7+
Setup
# Install dependencies
npm install
# Start development server
npm run dev
# Build for production
npm run build
# Type checking
npm run type-checkExample App
The project includes an example application to showcase the icons:
cd example-app
npm install
npm run devAdding New Icons
- Add your PNG icons to the appropriate resolution folders in
src/assets/png/ - Create a new component in
src/components/ - Export the component in
src/index.ts
Contributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-icon) - Commit your changes (
git commit -m 'Add amazing icon') - Push to the branch (
git push origin feature/amazing-icon) - Open a Pull Request
Icon Guidelines
- Icons should be in PNG format
- Provide icons in all required resolutions (64x64, 128x128, and 256x256)
- Maintain consistent style across all icons
- Ensure icons are properly centered and padded
- Use transparent backgrounds
License
MIT © Rafael Aguilar
