Ready to get started?

Join Adocasts Plus for $8/mo, or sign into an existing Adocasts Plus account, to get access to all of our lessons.

robot mascot smiling

Main Slot, Named Slots, and Slot Scopes

@tomgobich
Published by
@tomgobich
In This Lesson

We'll learn all about the main slot, how to define and use named slots, as well as passing state information from within our components to our slots using slot scopes.

So lastly, before we actually move on to creating our components, let's cover slots. Slots allow us to insert specific HTML content into designated areas within our components.

The Main Slot

First, let's understand the main slot, which we've already touched upon in our app layout. Anything enclosed between the component's start and end tags is rendered as the default slot.

Join the Discussion 0 comments

Create a free account to join in on the discussion
robot comment bubble

Be the first to comment!