0.0.4 • Published 11 months ago
@devicon/svelte v0.0.4
Here’s the documentation adapted for @devicon/svelte:
@devicon/svelte
Svelte components for the SVG icons of the devicon project.
Installation
yarn add @devicon/svelte
# OR
npm install @devicon/svelte
# OR
pnpm add @devicon/svelteUsage
Importing and Using Icons
Icons can be imported and used as Svelte components.
<script>
import ReactOriginalIcon from "@devicon/svelte/react/original/ReactOriginalIcon.svelte";
// or (not recommended, as it can significantly increase bundle size)
import { GithubOriginalIcon, GithubOriginalWordmarkIcon } from "@devicon/svelte";
</script>
<GithubOriginalWordmarkIcon />
<GithubOriginalIcon size="2em" />
<ReactOriginalIcon class="my-class" />With Color
Icons that support single-color customization can be recolored like this:
<script>
import DeviconPlainIcon from "@devicon/svelte/devicon/plain/DeviconPlainIcon.svelte";
</script>
<DeviconPlainIcon color="white" />