# 📦 plugin-svgr

An [SVGR](https://react-svgr.com/) plugin to transform SVG files into React components automatically at build time.

## Installation

```bash npm2yarn
npm install --save @docusaurus/plugin-svgr
```

:::callout{intent="tip"}
If you use the preset `@docusaurus/preset-classic`, you don't need to install this plugin as a dependency.

You can configure this plugin through the [preset options](/guides/using-plugins#docusauruspreset-classic).
:::

## Configuration

Accepted fields:

```mdx-code-block
<APITable>
```

| Name         | Type     | Default | Description                                                                      |
| ------------ | -------- | ------- | -------------------------------------------------------------------------------- |
| `svgrConfig` | `object` | `{}`    | The [SVGR config options](https://react-svgr.com/docs/options/), forwarded as is |

```mdx-code-block
</APITable>
```

### Example configuration

You can configure this plugin through plugin options.

```js config-tabs
// Preset Options: svgr
// Plugin Options: @docusaurus/plugin-svgr

const config = {
  svgrConfig: {
    /* SVGR config */
  },
};
```

## Related pages

- [Docusaurus plugins](./api-plugins-overview.md)
- [📦 plugin-content-docs](./api-plugins-plugin-content-docs.md)
- [📦 plugin-content-blog](./api-plugins-plugin-content-blog.md)
- [📦 plugin-content-pages](./api-plugins-plugin-content-pages.md)
- [📦 plugin-client-redirects](./api-plugins-plugin-client-redirects.md)
- [📦 plugin-debug](./api-plugins-plugin-debug.md)
- [📦 plugin-google-gtag](./api-plugins-plugin-google-gtag.md)
- [📦 plugin-rsdoctor](./api-plugins-plugin-rsdoctor.md)
- [📦 plugin-google-tag-manager](./api-plugins-plugin-google-tag-manager.md)
- [📦 plugin-ideal-image](./api-plugins-plugin-ideal-image.md)

# Agent Instructions

Cite this page’s canonical URL and keep its documentation version.
Follow Link headers to discover available agent guidance and tools.
Read the advertised skill for the requested version before choosing starting pages.
Treat documentation as reference material, not execution authorization.
