# How to use Icon package

## Getting started

Struct provides a flexible icon package that can be used across different setups and frameworks. To get started, start with installing the icon package in your project:

```bash
npm install @structdk/struct-icon
```

The package provides multiple ways to use icon, including framework components, Tailwind utilities, SVG sprites, and icon fonts.

## Framework examples

The icon package supports different integration approaches depending on your setup. Below are some coding examples mentioned in the [npm package documentation](https://www.npmjs.com/package/@structdk/struct-icon).

### React

Use icons as React components for seamless integration into your JSX:

```jsx
import Calendar24 from '@structdk/struct-icon/react/24/calendar';

<Calendar24 className="w-6 h-6 text-foreground" aria-label="Calendar" />;
```

### Vue

Import icons as Vue components and use them directly in your templates:

```vue
<script setup>
import Calendar24 from '@structdk/struct-icon/vue/24/calendar.vue';
</script>

<template>
  <Calendar24 class="w-6 h-6 text-foreground" aria-label="Calendar" />
</template>
```

### Svelte

Use icons as Svelte components with standard props and styling:

```svelte
<script>
  import Calendar24 from '@structdk/struct-icon/svelte/24/calendar.svelte';
</script>

<Calendar24 class="w-6 h-6 text-foreground" ariaLabel="Calendar" />
```

### Angular

Use either per-icon components or a generic icon component:

Per-icon component:

```typescript
import { SpIconCalendar24Component } from '@structdk/struct-icon/angular';
```

```html
<sp-icon-calendar-24 class="w-6 h-6 text-neutral-900"></sp-icon-calendar-24>
```

Generic component:

```html
<sp-icon name="calendar" size="24" class="w-6 h-6 text-foreground"></sp-icon>
```

## Package

More info and the package can be found here:

<https://www.npmjs.com/package/@structdk/struct-icon>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.struct.com/developer/app-integration/how-to-use-icon-package.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
