DEV Community

ndesanno
ndesanno

Posted on • Edited on

2

Slot Tags

Slot Tags

A Slot tag in HTML essentially allows a placeholder to be able to include your own markups/code. When the code is run, it shows all the pieces together. This effectively is a way to separate different parts of the code, but still have it show up as one.

Example

Image description

These cards have been developed by my team and I with help through the use of slot tags. Before development on the cards, we decided to break up the cards into parts to be able to take advantage of scaffolding slot tags. The breakdown is as follows: icon, banner and header, card, scaffold.

When in development, the '' tag helps us be more agile in the content we want to include and it helps increase reusability of the web component.

group repo: https://github.com/runtimeErrorsMadeEasy/project2

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

AWS GenAI LIVE!

GenAI LIVE! is a dynamic live-streamed show exploring how AWS and our partners are helping organizations unlock real value with generative AI.

Tune in to the full event

DEV is partnering to bring live events to the community. Join us or dismiss this billboard if you're not interested. ❤️