Slots


  • Provide a simple example of a parent component passing template content to a child component.

 

  • Can data in a parent’s <script setup> be injected into a child component’s slot?
  • Can data in a child’s <script setup> be accessed by the slot content?

 

  • How do you define fallback content for the case that a parent component does not pass content into the slot?

 

  • What is the value of a slot’s name attribute if slot does not explicitly define a name attribute.
  • How does a parent component pass content to a named slot?
  • What is the shorthand syntax for passing content to a named slot?