Files
Modrinth-plus/docs/routes/usage/icons.md

28 lines
784 B
Markdown
Raw Normal View History

---
title: Icons
---
2022-03-09 23:17:28 -08:00
## Choosing icons
The follwing icon packs are included with omorphia:
2022-03-09 23:17:28 -08:00
2022-06-13 12:48:43 -07:00
`heroicons-outline` `lucide` `fa-regular` `heroicons-solid` `carbon` `simple-icons`
2022-03-09 23:17:28 -08:00
Aim to find icons from `heroicons-outline` first, and then from the following packs if you can't find what you are looking for. [Browse icons...](https://icones.js.org/collection/heroicons-outline)
2022-03-09 23:17:28 -08:00
## Using icons
Import an icon in the `<script>` tag of your component.
2022-03-09 23:17:28 -08:00
Then use the icon as if it were a Svelte component:
2022-06-07 14:00:53 -07:00
> You can style the icon with the `.icon` class. Note, you will have to use the `:global(.icon)` selector in Svelte components.
2022-03-10 00:08:59 -08:00
```svelte example
<script lang="ts">
2022-06-04 00:46:23 -07:00
import IconHeart from 'virtual:icons/heroicons-outline/heart'
</script>
2022-03-10 00:08:59 -08:00
2022-06-07 14:00:53 -07:00
<p>That's lovely! <IconHeart /></p>
```