Ecosyste.ms: Awesome

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

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

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

astro astrojs phosphor phosphoricons

Last synced: 2 months ago
JSON representation

👩‍🚀 Phosphor icons as Astro components

Lists

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/outline/Sparkle.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](/LICENSE)