# Custom SVG Icon

While the Kendo UI for Angular suite provides a comprehensive library of over 500 built-in SVG icons, you might want to create and use your own custom SVG icons in your application.

The SVGIcon component allows you to define and display custom SVG icons. This can be achieved by passing a custom [`SVGIcon`](https://www.telerik.com/kendo-angular-ui-develop/components/icons/api/svgicon) object to the [`icon`](https://www.telerik.com/kendo-angular-ui-develop/components/icons/api/svgiconcomponent#icon) property of the `kendo-svgicon` component.

> caution The entire [`SVGIcon`](https://www.telerik.com/kendo-angular-ui-develop/components/icons/api/svgicon) object is rendered as trusted SVG markup and bypasses Angular's built-in HTML sanitization. This applies to the `content` property and to every entry in `variants` selected through the [`variant`](https://www.telerik.com/kendo-angular-ui-develop/components/icons/api/svgiconcomponent#variant) input. Pass only icon objects from a trusted source, such as the `@progress/kendo-svg-icons` package or SVG markup that you author and control. Never bind the [`icon`](https://www.telerik.com/kendo-angular-ui-develop/components/icons/api/svgiconcomponent#icon) or [`variant`](https://www.telerik.com/kendo-angular-ui-develop/components/icons/api/svgiconcomponent#variant) properties to user-supplied or otherwise untrusted content, because doing so can enable cross-site scripting.

The following example demonstrates how to use custom SVG icons.

[Demo Source](https://demos.telerik.com/kendo-angular-ui/demos/icons/svg-icon/custom-icon/source.txt)

## Steps to Add a Custom SVG Icon

To add a custom SVG icon in Kendo UI for Angular components:

1. Define the [`SVGIcon`](https://www.telerik.com/kendo-angular-ui-develop/components/icons/api/svgicon) in a TypeScript file with the desired `name`, `content`, and `viewBox` properties. The `content` property supports [common SVG elements](https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element) such as `<path>`, `<circle>`, `<rect>`, `<polygon>`, and others.

   ```typescript
   export const customSVG = {
     name: "simple-icon",
     content: "<circle cx='12' cy='12' r='10'/><rect x='8' y='8' width='8' height='8'/>",
     viewBox: "0 0 24 24"
   }
   ```

2. Import the custom SVG icon in the component TypeScript file.

   ```typescript
   import { car, customSVG, star } from "./custom-svg-icons";
   import { SVGIcon } from '@progress/kendo-svg-icons';

   export class AppComponent {
     public customSVG: SVGIcon = customSVG;
   }
   ```

3. Use the icon in the component template.

   ```html
   <kendo-svgicon [icon]="customSVG"></kendo-svgicon>
   ```

## Suggested Links

* [Override Built-in SVG Icons of the Kendo Angular Components](https://www.telerik.com/kendo-angular-ui-develop/components/knowledge-base/override-svg-icons)
* [API Reference of the SVGIcon](https://www.telerik.com/kendo-angular-ui-develop/components/icons/api/svgiconcomponent)
* [Icon Settings](https://www.telerik.com/kendo-angular-ui-develop/components/icons/icon-settings)
* [SVG Icons List](https://www.telerik.com/kendo-angular-ui-develop/components/icons/svgicon/svgicon-list)
