spectrum-web-components
spectrum-web-components copied to clipboard
Missing body slot in card component
As per https://spectrum.adobe.com/page/cards/#Anatomy , the card component might have a body section.

Is it possible to add a slot for it: https://github.com/adobe/spectrum-web-components/blob/947e81061fb9db8a3f7cb6603cf0ff9b4107f4ae/packages/card/src/Card.ts#L248
${this.variant !== 'gallery'
? html`
<div class="content">
${this.renderSubtitleAndDescription}
</div>
`
: html``}
+ <slot name="body"></slot>
</div>
${this.variant === 'standard'
? html`
<slot name="footer"></slot>
`
: html``}
Generally, we try not to ship things on the delivery of which we do not have styling direction . In this way, being the body content is not currently included in Spectrum CSS I'm not sure that we'll be shipping this in the near future.
There are active conversations at the Spectrum level around updating the Card content delivery guidelines in a way that may open a path towards offering something like this in the future. In the interim, you might find success in registering a local extension of the element that features this interface.
Thanks for the explanation!