Home
Softono

Svelte Octicons

Open source MIT TypeScript
11
Stars
0
Forks
0
Issues
1
Watchers
6 months
Last Commit

 About Svelte Octicons

GitHub Octicons as Svelte components

Platforms

Web Self-hosted

Languages

TypeScript

Need Help Installing Svelte Octicons?

We provide expert installation service for this software. Our team will install, configure, and secure Svelte Octicons on your server. plans start at just $30.

Svelte Octicons

View on GitHub

svelte-octicons

NPM

GitHub Octicons as Svelte components.

This library builds GitHub Primer Octicons as Svelte components with zero dependencies.

Try it in the Svelte REPL.


Installation

# npm
npm i svelte-octicons

# pnpm
pnpm i svelte-octicons

# Bun
bun i svelte-octicons

# Yarn
yarn add svelte-octicons

Usage

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

Base import

$$restProps are forwarded to the svg element.

<script>
  import { Alert16, Diamond16, Rocket16, Video16 } from "svelte-octicons";
</script>

<Alert16 />
<Diamond16 />
<Rocket16 />
<Video16 />

Custom fill

<Alert16 fill="red" />

Usage with svelte:component

<script>
  import * as Octicons from "svelte-octicons";
</script>

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

TypeScript

Svelte version 3.31 or greater is required to use this library with TypeScript.

Changelog

Changelog

License

MIT