DEV Community

Discussion on: Who doesn't love some `<slot />`s?

Collapse
 
westbrook profile image
Westbrook Johnson

Did I communicate "helps you manage" somewhere on mistake? If, so I'd love to clarify if you could share more as to where I'm leading readers astray.

The validity state manages whether the parent slots uses a name that is non-sensical vs negative-help-text so that it only opens the negative-help-text slot to receive content when the form control in invalid. This empowers the automatic switching between the two types of help text when present.

Collapse
 
bennypowers profile image
Benny Powers 🇮🇱🇨🇦

I see so in that way, by swapping between the 'real' slot name and a random one, you're gating access to the shadow DOM for elements slotted into that 'real' slot