DEV Community

ksanroman
ksanroman

Posted on • Updated on

Slot Composition

Slots

Slots are placeholder code that is inside a web component that users can fill with their own code. These web components are a composition between the compontents internals and the elements provided by the user for the custom element. When you run the code it shows eveything put together. Slots are a way to make custom code easy and simple for the user.

Example

Image description

The screenshot above is the cards my team have created using slot tags

source: https://javascript.info/slots-composition

group repo: https://github.com/IST-402-Group-1/project-two

Discussion (0)