DEV Community

ColtonE37
ColtonE37

Posted on

Slots?

Image description

Slots are a HTML element that allows the user to set a placeholder inside of a web component to fill up with any markup. This lets you create multiple DOM trees and present them all together.

Image description

Our latest project, called learning-card, has multiple uses of this element for us to fill with any content we want. Below is the example card that we are trying to replicate.

Image description
This is what we have so far for this project, as there is a lot more to fix and add to this.

Image description

Follow the project: https://github.com/TheKodingKrab/project-two

Discussion (0)