#Is it possible to have an Astro component place itself into a named slot of it's parent by default?
1 messages · Page 1 of 1 (latest)
Hi @main yew. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
No, to place the HeroPreTitle component into the pre-title slot of the Hero component, you need to provide the slot attribute with the corresponding slot name on the HeroPreTitle component. Without the slot attribute, the HeroPreTitle component will be placed in the default (unnamed) slot of the Hero component.
Here's how you should use the slot attribute:
<Hero>
<HeroPreTitle slot="pre-title" />
</Hero>