Skip to content
iconpacks

Svelte

Use the CLI to add icons as Svelte components.

Add an icon

There is no component library to install. Use the CLI to add components: in a Svelte project, init finds the framework and the icons folder once, and add writes each icon you name as a component file you own.

npx @hasna/iconpacks init
npx @hasna/iconpacks add tool-call

Use it

The component takes a size and a strokeWidth, and draws in the current text colour, so it follows the text around it.

<script lang="ts">
  import ToolCallIcon from "$lib/icons/ToolCallIcon.svelte"
</script>

<ToolCallIcon class="size-4" />

Search

Search icons by name, meaning and keywords, and the docs.