### Install via npm
Source: https://movingicons.dev
Install the icons package via npm.
```bash
npm i @jis3r/icons
```
--------------------------------
### npm install @jis3r/icons
Source: https://movingicons.dev
Install the Moving Icons library via npm to use the animated Svelte icon components.
```APIDOC
## npm install @jis3r/icons
### Description
Install the Moving Icons library via npm to use the animated Svelte icon components.
### Method
npm install
### Endpoint
npm i @jis3r/icons
### Parameters
None
### Request Example
```bash
npm i @jis3r/icons
```
### Response
#### Success Response
Installation completes successfully.
#### Response Example
```
added 1 package
```
```
--------------------------------
### Add via shadcn-svelte registry
Source: https://movingicons.dev
Add an icon to your project using the shadcn-svelte registry. Ensure shadcn-svelte is installed first. Icons are added to src/lib/components/movingicons.
```bash
npx shadcn-svelte@latest add https://movingicons.dev/r/[icon-name]
```
--------------------------------
### Import and use icons
Source: https://movingicons.dev
Import icons as named Svelte components. All icons are named exports in PascalCase, identical to Lucide icon names. Compatible with SvelteKit and Svelte projects.
```svelte
```
--------------------------------
### Import icons as named Svelte components
Source: https://movingicons.dev
Import icons as named Svelte components from the @jis3r/icons package. All icons are available as named exports in PascalCase.
```APIDOC
## Import icons as named Svelte components
### Description
Import icons as named Svelte components from the @jis3r/icons package. All icons are available as named exports in PascalCase.
### Method
Import
### Endpoint
import { Activity, Star } from '@jis3r/icons';
### Parameters
None
### Request Example
```svelte
```
### Response
#### Success Response
Icons are rendered as Svelte components.
#### Response Example
```html
```
```
--------------------------------
### npx shadcn-svelte@latest add https://movingicons.dev/r/[icon-name]
Source: https://movingicons.dev
Add individual icons to your project using the shadcn-svelte registry. This command copies the icon component into your project's src/lib/components/movingicons directory.
```APIDOC
## npx shadcn-svelte@latest add https://movingicons.dev/r/[icon-name]
### Description
Add individual icons to your project using the shadcn-svelte registry. This command copies the icon component into your project's src/lib/components/movingicons directory.
### Method
npx command
### Endpoint
npx shadcn-svelte@latest add https://movingicons.dev/r/[icon-name]
### Parameters
#### Path Parameters
- **icon-name** (string) - Required - The name of the icon to add.
### Request Example
```bash
npx shadcn-svelte@latest add https://movingicons.dev/r/activity
```
### Response
#### Success Response
Icon component added to the project.
#### Response Example
```
✔ Done
```
```
--------------------------------
### Icon component props
Source: https://movingicons.dev
Documentation for the props accepted by all icon components in the Moving Icons library.
```APIDOC
## Icon component props
### Description
Documentation for the props accepted by all icon components in the Moving Icons library.
### Method
Component Props
### Endpoint
### Parameters
#### Component Props
- **size** (number) - Optional - Icon size in pixels. Default: 24
- **color** (string) - Optional - Stroke color (CSS color value). Default: 'currentColor'
- **strokeWidth** (number) - Optional - SVG stroke width. Default: 2
- **class** (string) - Optional - Optional additional CSS classes.
- **animate** (boolean) - Optional - Controls icon animation state. Default: false
### Request Example
```svelte
```
### Response
#### Success Response
Icon component renders with the specified props.
#### Response Example
```html
```
```
--------------------------------
### Advanced usage: wrapper component with snippets
Source: https://movingicons.dev
Create a reusable wrapper component using Svelte snippets to pass hover state to children, allowing icons to animate on hover.
```APIDOC
## Advanced usage: wrapper component with snippets
### Description
Create a reusable wrapper component using Svelte snippets to pass hover state to children, allowing icons to animate on hover.
### Method
Component Usage
### Endpoint
...
### Parameters
#### Component Props
- **children** (snippet) - Required - A snippet that receives the hover state.
- **class** (string) - Optional - Additional CSS classes.
### Request Example
```svelte
// HoverableItem.svelte
```
Use the wrapper component in your navigation:
```svelte
```
### Response
#### Success Response
Icons animate when the wrapper is hovered.
#### Response Example
```html
```
```
--------------------------------
### Create HoverableItem wrapper component
Source: https://movingicons.dev
A reusable wrapper component that passes hover state to its children via snippets, allowing icons to animate on hover.
```svelte
// HoverableItem.svelte
```
--------------------------------
### Use HoverableItem in navigation
Source: https://movingicons.dev
Use the HoverableItem wrapper component in a navigation, passing the hover state to icons via snippets.
```svelte
```
--------------------------------
### Bind animate prop to hover state
Source: https://movingicons.dev
Control icon animations from parent elements by binding the animate prop to your own hover state.
```svelte
```
--------------------------------
### Advanced usage: binding animate prop
Source: https://movingicons.dev
Control icon animations from parent elements by binding the animate prop to your own hover state.
```APIDOC
## Advanced usage: binding animate prop
### Description
Control icon animations from parent elements by binding the animate prop to your own hover state.
### Method
Component Usage
### Endpoint
### Parameters
#### Component Props
- **animate** (boolean) - Required - The animation state, typically bound to a hover state.
- **size** (number) - Optional - Icon size in pixels.
### Request Example
```svelte
```
### Response
#### Success Response
Icon animates when the parent element is hovered.
#### Response Example
```html
```
```
=== COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.