I wouldn't say i fully know when to use spans ... from what i understand they are similar to div's, but spans should be used when you just want to add style to a single element. So i use them to to hold and style svg icons and in this instance just to style a single text element within the div, but there is every chance i am using them wrong 😂
Slots on the other hand are one of my favourite things about toddle and components, they allow you to define a space or "slot" within your component to render mark up from the page you add the component to. This makes building reusable components super easy, You can simply add a slot somewhere on your component, name it and then when you add the component to a page you can add a child div to the component and select the slot name, then anything inside that displays in the component on the page, it's like magic 🪄
in the example you will see the slot is named dropdownContent and then on the page i have added the component and given it some nested markup and the first div has the slot dropdownContent selected which is how it is all displaying in the right place