DEV Community

Discussion on: How to create a dropdown with TailwindCSS and Vue

Collapse
 
victorioberra profile image
Victorio Berra

Finally, we pass bind :open and :toggleOpen to our

To our what James?! To our what?!

Collapse
 
jw_baldwin profile image
James Baldwin • Edited

Fair point! I updated that to hopefully explain what's going there. There are more details in the next snippet as well :)

This is a use of scoped slots (Vue 2.6+), and it allows the slot content simple access to data that only the child component has. (vuejs.org/v2/guide/components-slot...)

Hope that helps!

(P.S. Realized now, that the <slot> I wrote there got rendered away... But leaving this in case someone actually wants the information. 🤦)

Collapse
 
victorioberra profile image
Victorio Berra

Much clearer, thanks for the update!