> For the complete documentation index, see [llms.txt](https://docs.ult.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ult.dev/components/svg.md).

# SVG \*

### Installation

{% hint style="info" %}
&#x20;This component is not included by default, to use it import the following package:
{% endhint %}

{% tabs %}
{% tab title="NPM" %}

```bash
$ npm i react-ult-ext-imagesvg
```

{% endtab %}

{% tab title="Yarn" %}

```
yarn add react-ult-ext-imagesvg
```

{% endtab %}
{% endtabs %}

### Styles

* Flexbox Styles
* View Styles
* Transform Styles

### Svg Props

| Name                    | Type                                             | Description                                                                                             |
| ----------------------- | ------------------------------------------------ | ------------------------------------------------------------------------------------------------------- |
| **style**               | `ImageSvgStyleRuleSet \| ImageSvgStyleRuleSet[]` | <ul><li>See below for supported styles</li></ul>                                                        |
| **fillColor**           | `color`                                          | <ul><li>Color and opacity of fill</li><li>Default values are provided by SVG</li></ul>                  |
| **fillOpacity**         | `number`                                         | <ul><li>Color and opacity of fill</li><li>Default values are provided by SVG</li></ul>                  |
| **preserveAspectRatio** | `boolean`                                        | <ul><li> Preserve aspect ratio or stretch?</li></ul>                                                    |
| **strokeColor**         | `color`                                          | <ul><li>Color</li><li>Width and opacity of stroke</li><li>Default values are provided by SVG</li></ul>  |
| **strokeWidth**         | `number`                                         | <ul><li>Color</li><li>Width and opacity of stroke</li><li>Default values are provided by SVG</li></ul>  |
| **strokeOpacity**       | `number`                                         | <ul><li>Color</li><li>Width and opacity of stroke;</li><li>Default values are provided by SVG</li></ul> |
| **title**               | `string`                                         | <ul><li>Tooltip for image</li></ul>                                                                     |
| **viewBox**             | `string`                                         | <ul><li>Bounding box</li></ul>                                                                          |
| **webShadow**           | `boolean`                                        | <ul><li>Shadow</li></ul>                                                                                |

### SvgCommon Props

| Name              | Type     | Description                                                                                             |
| ----------------- | -------- | ------------------------------------------------------------------------------------------------------- |
| **fillColor**     | `color`  | <ul><li>Color and opacity of fill</li><li>Default values are provided by SVG</li></ul>                  |
| **fillOpacity**   | `number` | <ul><li>Color and opacity of fill</li><li>Default values are provided by SVG</li></ul>                  |
| **strokeColor**   | `color`  | <ul><li>Colo</li><li>Width and opacity of stroke</li><li>Default values are provided by SVG</li></ul>   |
| **strokeWidth**   | `number` | <ul><li> Color</li><li>Width and opacity of stroke</li><li>Default values are provided by SVG</li></ul> |
| **strokeOpacity** | `number` | <ul><li>Color</li><li>Width and opacity of stroke</li><li>Default values are provided by SVG</li></ul>  |

### SvgPath Props

| Name  | Type     | Description                              |
| ----- | -------- | ---------------------------------------- |
| **d** | `string` | <ul><li>Path definition string</li></ul> |

### SvgRect Props

| Name       | Type     | Description                                                       |
| ---------- | -------- | ----------------------------------------------------------------- |
| **x**      | `number` | <ul><li>Position and dimension information for the rect</li></ul> |
| **y**      | `number` | <ul><li>Position and dimension information for the rect</li></ul> |
| **width**  | `number` | <ul><li>Position and dimension information for the rect</li></ul> |
| **height** | `number` | <ul><li>Position and dimension information for the rect</li></ul> |


---

# 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.ult.dev/components/svg.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.
