Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/seanmcp/phosphor-astro

👩‍🚀 Phosphor icons as Astro components
https://github.com/seanmcp/phosphor-astro

astro astrojs icons phosphor phosphor-icons phosphoricons

Last synced: 27 days ago
JSON representation

👩‍🚀 Phosphor icons as Astro components

Awesome Lists containing this project

README

        

# phosphor-astro

[![npm](https://img.shields.io/npm/v/phosphor-astro.svg)](https://npmjs.com/package/phosphor-astro) [![npm](https://img.shields.io/npm/dt/phosphor-astro.svg)](https://npmjs.com/package/phosphor-astro)

👩‍🚀 Phosphor icons as Astro components

## Installation

Add `phosphor-astro` to your project:

```sh
npm install phosphor-astro
# or
yarn add phosphor-astro
```

## Use

Import the icons from `phoshor-astro` and add it to your code:

```jsx
---
import RocketLaunch from 'phosphor-astro/RocketLaunch.astro':
import ArrowRight from 'phosphor-astro/ArrowRightBold.astro':
import Sparkle from 'phosphor-astro/SparkleDuotone.astro':
---






```

## Astro components

The components exported from `phosphor-astro` are the raw `svg` elements from Phosphor with `{...Astro.props}` added to the root element. This should enable you to customize the element as you see fit.

```jsx
// Book.astro



```

Any prop that you pass to the component will be added to the top-level `svg` element:

```jsx
// Heart.astro

```

## License

[MIT](/LIBRARY_LICENSE)