I downloaded the accordion from the unity forums and I'm trying to add a button to it. issue is with the vertical layout group. when any UI element is added the layout will automatically go vertical and scale accordingly. i fixed it by adding a layout element on the button and ticking the ignore layout option. However this generates another issue. when the UI is folded (accordion is folded) the buttons scale down and show. See image below these buttons are inside section 1. and when it's opened they show up as i want. Any idea on how to fix this?
You can achieve this by adding a layout holder for your buttons that has a horizontal group layout. Note that if you want a custom group layout you will probably have to write it yourself. This screenshot shows how I set up the element.
From there you can play with the preffered width and height of the layout element component of each button.
Hope this helps :)