Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/metonym/svelte-gitlab-icons

GitLab SVG icons as Svelte components
https://github.com/metonym/svelte-gitlab-icons

gitlab-icons icon-library icons svelte svelte-components

Last synced: 25 days ago
JSON representation

GitLab SVG icons as Svelte components

Awesome Lists containing this project

README

        

# svelte-gitlab-icons

[![NPM][npm]][npm-url]

> [GitLab SVG icons](https://gitlab.com/gitlab-org/gitlab-svgs) as Svelte components.

Try it in the [Svelte REPL](https://svelte.dev/repl/43aa7623339d47d1b4403a1a35f60446).

---

## Installation

```bash
# Yarn
yarn add -D svelte-gitlab-icons

# npm
npm i -D svelte-gitlab-icons

# pnpm
pnpm i -D svelte-gitlab-icons
```

## Usage

### Basic

```svelte

import { Api, Fire, MergeRequestOpen } from "svelte-gitlab-icons";

```

Refer to [ICON_INDEX.md](ICON_INDEX.md) for a list of supported icons.

### Direct import

Directly import an icon for faster compiling during development.

```html

import Api from "svelte-gitlab-icons/lib/Api.svelte";

```

## Rendering icons using `svelte:component`

```svelte

import * as icons from "svelte-gitlab-icons";

{#each Object.entries(icons) as [icon, component]}



{icon}

{/each}
```

## [Changelog](CHANGELOG.md)

## License

[MIT](LICENSE)

[npm]: https://img.shields.io/npm/v/svelte-gitlab-icons.svg?color=%23e2432a&style=for-the-badge
[npm-url]: https://npmjs.com/package/svelte-gitlab-icons