# Accordion SVG Icons

**URL:** <https://forums.realmacsoftware.com/t/accordion-svg-icons/46323>\
**Category:** RapidWeaver Elements\
**Created:** [February 18, 2025, 8:24pm UTC](https://forums.realmacsoftware.com/t/accordion-svg-icons/46323 "2025-02-18T20:24:10Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![handshaper](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/handshaper/32/27373_2.png) [@handshaper](https://forums.realmacsoftware.com/u/handshaper)\
**Post date:** [February 18, 2025, 8:24pm UTC](https://forums.realmacsoftware.com/t/accordion-svg-icons/46323/1 "2025-02-18T20:24:10Z")

</div>

Please consider changing the icons in the accordion to using an SVG component instead of the hybrid SVG currently being used.

I can never get the colors to be applied to the SVG to work. Sometimes I have an SVG that needs to the color to be a **stroke** and other times a **fill**. I have tried both options and the colors are never set with the current approach.

It is not clear how the current color is going to be be applied.

---

<div class="post-metadata">

**Author:** ![ben](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/ben/32/28488_2.png) [@ben](https://forums.realmacsoftware.com/u/ben)\
**Post date:** [February 19, 2025, 10:08am UTC](https://forums.realmacsoftware.com/t/accordion-svg-icons/46323/2 "2025-02-19T10:08:01Z")

</div>

We could do something similar to the Button component, where you get a dropzone so you can add any component you like - would that work?

---

<div class="post-metadata">

**Author:** ![handshaper](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/handshaper/32/27373_2.png) [@handshaper](https://forums.realmacsoftware.com/u/handshaper)\
**Post date:** [February 19, 2025, 6:07pm UTC](https://forums.realmacsoftware.com/t/accordion-svg-icons/46323/3 "2025-02-19T18:07:02Z")

</div>

@ben I think that would be perfect as it would give maximum flexibility, plus familiarity from the Button component.

---

<div class="post-metadata">

**Author:** ![ben](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/ben/32/28488_2.png) [@ben](https://forums.realmacsoftware.com/u/ben)\
**Post date:** [February 21, 2025, 9:20am UTC](https://forums.realmacsoftware.com/t/accordion-svg-icons/46323/4 "2025-02-21T09:20:24Z")

</div>

**@handshaper** Adding drop zone support for the Accordion icon is trickier than it seems.

Right now, the setup allows you to drop in an SVG resource, which ensures the icon’s style can change based on the Accordion’s state (open or closed). However, if we allow any component to be added instead, styling it dynamically based on the state won’t be possible.

This means adding an SVG via a drop zone won’t work, as it wouldn’t be able to adjust its appearance based on the Accordion’s state.

What is it exactly you’re finding difficult with the current setup?

---

<div class="post-metadata">

**Author:** ![handshaper](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/handshaper/32/27373_2.png) [@handshaper](https://forums.realmacsoftware.com/u/handshaper)\
**Post date:** [February 21, 2025, 7:07pm UTC](https://forums.realmacsoftware.com/t/accordion-svg-icons/46323/5 "2025-02-21T19:07:02Z")

</div>

> [@bon](#):
>
> What is it exactly you’re finding difficult with the current setup?

@bon The problem I have with the current approach is that it does not give me any control over the color and opacity of both the fill and stroke option for an SVG. All that is available is a color choice with no indication of how that color will be applied. Is it used for a fill or a stroke.

I understand the need for controling the SVG, but at the very least could we have all of the standard properties that are exposed by an SVG component.

I have tried to get the color choice to work and it never seems to be applied to my SVG. I’m sure part of this is due to the finickiness of SVG’s in the first place. But knowing how the color was going to be used would have helped.

So my choice would be to simply expose all of properties of the SVG, or at the very least be more specific about whether the color is for a fill or stroke.

_UPDATE: I just spent most of the day experimenting with the SVG icon support. I now understand how the color is being applied and have been able to make it work the way I want. It took some formatting of my SVG assets to make it work, but nothing new there. So my main request now would be to add support for handling the stroking of the SVG, Currently, it is only FILL that appears to be supported. Sorry it took me so long to understand how the color was being applied._
