Published On Dec. 7th 2016

Learn Vue 2: Step By Step: Named Slots in a Nutshell

Episode 14 Run Time 5:54

Download

So far, we've only reviewed default component slots. Or, in other words, "take this bit of content, and insert it right there, as designated by the slot tags. But what about when we require more control? A modal component is a perfect example of this. If you want to slot a header section in one place, and a footer section in another, named slots are exactly what you need.

View the source code for this example on GitHub.