> For the complete documentation index, see [llms.txt](https://docs.struct.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.struct.com/developer/app-integration/how-to-use-icon-package.md).

# 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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
