svelte-gitlab-icons Svelte Themes

Svelte Gitlab Icons

GitLab SVG icons as Svelte components

svelte-gitlab-icons

GitLab SVG icons as Svelte components.

Try it in the Svelte REPL.


Installation

# Yarn
yarn add -D svelte-gitlab-icons

# npm
npm i -D svelte-gitlab-icons

# pnpm
pnpm i -D svelte-gitlab-icons

Usage

Basic

<script>
  import { Api, Fire, MergeRequestOpen } from "svelte-gitlab-icons";
</script>

<Api />
<Fire />
<MergeRequestOpen />

Refer to ICON_INDEX.md for a list of supported icons.

Direct import

Directly import an icon for faster compiling during development.

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

Rendering icons using svelte:component

<script>
  import * as icons from "svelte-gitlab-icons";
</script>

{#each Object.entries(icons) as [icon, component]}
  <div>
    <svelte:component this={component} />
    {icon}
  </div>
{/each}

Changelog

License

MIT

Top categories

Loading Svelte Themes