Skip to content
Kineticons

Start

Svelte

Use Kineticons in Svelte 5 and SvelteKit with the Icon component.

Install

shell
npm install @kineticons/svelte

Requires Svelte 5.

Usage

svelte
<script lang="ts">
  import { Icon } from "@kineticons/svelte";
  import { bell, trash } from "@kineticons/svelte/icons";
  let recording = $state(false);
</script>

<button class="ki-trigger">
  <Icon icon={bell} variant="duotone" size={20} /> Notifications
</button>

<Icon icon={trash} trigger="manual" active={recording} />

Props

icon (required), then the same props as the other packages. class and any SVG attribute go on the <svg>.

PropTypeDefaultWhat it does
iconIconDefThe icon to draw, from @kineticons/svelte/icons.
variant"outline" | "duotone" | "filled""outline"The style.
sizenumber | string24Width and height, in pixels (or any CSS length as a string).
strokeWidthnumber1.75Stroke in 24-grid units; the same visual weight at any size.
trigger"hover" | "manual" | "loop" | "none""hover"When the icon moves.
activebooleanfalseWith trigger "manual": plays while true.
loopEverynumber1800With trigger "loop": one beat, in milliseconds.
titlestringAn accessible name: the icon is then announced as an image.

Something unclear or missing? Open an issue.