Just a simple integration for Phosphor Icons in Nuxt
-
Add
nuxt-phosphor-icons
dependency to your project# Using pnpm pnpm add -D nuxt-phosphor-icons # Using yarn yarn add --dev nuxt-phosphor-icons # Using npm npm install --save-dev nuxt-phosphor-icons
-
Add
nuxt-phosphor-icons
to themodules
section ofnuxt.config.ts
export default defineNuxtConfig({
modules: ["nuxt-phosphor-icons"],
});
- Icon usage in your code
<PhosphorIcon{ icon-name }/>
Example :-
<!-- Phone icon -->
<PhosphorIconPhone :size="32" color="#fafafa" weight="fill" />
<!-- Envelope Simple icon -->
<PhosphorIconEnvelopeSimple :size="32" color="#fafafa" weight="fill" />
That's it! You can now use nuxt-phosphor-icons
in your Nuxt app ✨
- Documentation: https://nuxt-phosphor-icons.vercel.app
- Phosphor Icons: https://phosphoricons.com
You can contribute to this module with StackBlitz:
or locally for either
- Clone the repository
- Install dependencies with
pnpm install
- Run development server with
pnpm docs:dev
Note: Hosted on Vercel
- Clone the repository
- Install dependencies with
pnpm install
- Run development server with
pnpm playground:dev