SVG
The SVG Widget lets you display a scalable vector graphic (SVG) — such as a logo, icon, or illustration — anywhere in your Astroid layout. Because SVGs are vector-based, they stay sharp at any size and on any screen. You can control the SVG's width and height per device, and even override its colors for light and dark modes.

📌 Features
- Select an SVG file from the Joomla Media Manager or upload a new one
- Responsive width and height settings (per device)
- Override SVG fill and stroke colors for light and dark modes
- Add a custom CSS class for extra styling
- Animation, advanced styling, and page assignment options
🔍 Step 1: Add the SVG Widget to the Layout
- Go to your Joomla Administrator Panel
- Navigate to:
System→Site Template Styles→ Click on your Astroid template - Click the “Template Options” button
- Open the Layout tab
- Launch the Layout Builder
- Click the ➕ button where you want to add the SVG.
- Select SVG from the Media widget list.


⚙️ Step 2: Configure the SVG Widget
After adding the widget, click the ⚙️ (settings) icon to open the configuration panel. The General tab contains the main options for the SVG.

| Option | Description |
|---|---|
| Element Title | The name of the widget shown in the Layout Builder (e.g., SVG, Site Logo). It is used for identification only and is not displayed on the frontend. |
| Select SVG | Click Select Image / Change Image to choose an SVG file from the media library or upload a new one. The selected file path is shown in the Url field (e.g., company/logo.svg). Click Clear to remove it. |
| SVG Width | The width of the SVG (e.g., 160px). Use the unit selector to change the unit and the device selector (Global, Desktop, Tablet, Mobile…) to set a different width per screen size. |
| SVG Height | The height of the SVG (e.g., 160px). Like width, it supports units and responsive values per device. |
| SVG Color | Override the SVG's fill and stroke colors for light and dark modes. Areas whose fill or stroke is set to none remain unchanged. Leave empty to keep the original colors of the file. |
| Custom Class | Add one or more CSS classes to the SVG wrapper (e.g., logo-white) for custom styling via your own CSS. |
💡 Tip: If you only set the width (or height), keep the other value proportional to the SVG's original aspect ratio to avoid unwanted empty space around the graphic.
🎨 Step 3: Other Tabs
| Tab | Description |
|---|---|
| Settings | Spacing (margin/padding), background, border, alignment, and responsive visibility options. |
| Animation | Add an entrance animation (e.g., fade, slide, zoom) with duration and delay when the SVG appears in the viewport. |
| Advanced | Configure the widget's dynamic content source. |
| Assignment | Choose where the widget is displayed. |
📌 Step 4: Assign Widget to Specific Pages
In the Assignment tab, choose where the widget will be displayed:
- All pages
- No pages
- Specific pages only → Select specific menu items
Click Save changes to apply your settings, then save the template.
🎯 Example Use Cases
- ✅ Display your site or company logo in the header or footer
- ✅ Show icons or illustrations that stay crisp on retina screens
- ✅ Use a single-color SVG and recolor it to match your brand or dark mode
- ✅ Add decorative shapes or dividers between sections
✅ Tips
- Use SVG Color to make one SVG file work on both light and dark backgrounds instead of uploading two versions.
- Optimize your SVG files (e.g., with SVGOMG) to reduce file size.
- Only upload SVG files from trusted sources, since SVGs can contain scripts.
🛠 Troubleshooting
- SVG not showing?
- Make sure an SVG file is selected and the path in the Url field is correct.
- Check that the Assignment setting includes the current page.
- Verify that SVG Width / SVG Height are not set to
0for the current device.
- Color override not applied?
- Parts of the SVG with
fill="none"orstroke="none"are intentionally left unchanged. - Colors defined inside embedded
<style>blocks or gradients in the SVG file may take precedence.
- Parts of the SVG with