| description | Display and style scalable vector graphics |
|---|
The SVG component displays scalable vector artwork such as icons, logos, and illustrations. SVGs remain sharp at every size and can often be recoloured directly from Elements.
{% hint style="info" %} By default, the component removes size, fill, stroke, and style attributes from the rendered SVG so its appearance can be controlled in the Inspector. The original resource stored in Elements is not changed. {% endhint %}
The component accepts SVG resources. Use the Image component for JPG, PNG, and other bitmap images.
You’ll find SVG under Media in the Components list.
- Drag SVG onto the page.
- Drop an SVG from Finder or Resources into the SVG field.
- Decide which embedded attributes Elements should remove.
- Configure Fill, Stroke, Link, and Sizing.
- Preview hover states in a browser.
SVG selects the resource.
Under Remove Attributes, each switch controls whether Elements strips that attribute while rendering:
- Size — Removes embedded width and height. Enabled by default.
- Fill — Removes embedded fill attributes. Enabled by default.
- Stroke — Removes embedded stroke attributes. Enabled by default.
- Styles — Removes embedded style attributes. Enabled by default.
Disable a switch when the original SVG must retain that attribute.
Type can be None, Static, or Hover.
For Hover, Over chooses Self or Parent and State switches between Start and End.
Each visible state provides Color and Opacity. Both Start and End default to Surface 50 at 100% opacity.
Type can be None, Static, or Hover. Hover provides Start and End states and can be triggered by Self or Parent.
Each state provides Color, Opacity, and Width. Colours default to Surface 50, opacity to 100%, and width to 1.
Set To to make the SVG link to a page, resource, website, email address, phone number, anchor, or another supported destination.
Elements can remove common attributes at render time, but the SVG’s internal structure still determines whether fills and strokes respond correctly.
- Remove fixed
widthandheightvalues when the SVG does not resize as expected. - Use
currentColorfor fill or stroke when the artwork is designed to inherit a colour. - If
currentColorprevents the Inspector from controlling the artwork, remove it and test again. - Complex inline styles or multiple hard-coded fills may require editing in an SVG tool.
Use currentColor—or remove a fixed fill—when the SVG should inherit its colour.
Remove fixed width and height values when they prevent responsive sizing.
For a practical workflow, see SVG Cleanup with Sketch. You can use Sketch with the SVGO Compressor plugin.
{% embed url="https://share.cleanshot.com/TsQRDhMX" %}
For a deeper introduction to working with SVG, see Practical SVG.
Decorative SVGs should not duplicate nearby text. When an SVG conveys meaning, provide an accessible text label through the surrounding link, button, caption, or content structure.
Check for hard-coded fill, stroke, class, or style values inside the SVG. Enable the relevant Remove Attributes switches, or clean the file in an SVG editor.
Enable Remove Attributes → Size or remove fixed width and height attributes from the source SVG, then use the component’s Sizing controls.
- Image — Displays bitmap images with responsive source and lightbox controls.
- Mask — Uses an SVG to reveal wrapped content.
{% include "../../.gitbook/includes/common-controls.md" %}

