Slots

Learn how to send data to child components using slots in Vue.js.

If you want to pass data to child components only for the purpose of displaying it in the child component, then it is not necessary that you send it via props. Vue.js offers another way to send data to the components that is more intuitive and simpler. This is called slots. Slots are placeholders in the child components that are filled with the data passed to these components. The data passed to the child component can be simple text, HTML, or even another component.

Get hands-on with 1400+ tech skills courses.