Skip to content

Slot for built-in Footer component #3115

Closed Answered by delucis
awhitford asked this question in Q&A
Discussion options

You must be logged in to vote

Thanks for the suggestion and the PR @awhitford!

I’m not sure this is needed to achieve what you describe? It’s already valid to do:

---
import Default from '@astrojs/starlight/components/Footer.astro';
---

<Default />
<div class="github">
  <!-- additional UI -->
</div>

The issue with doing this via a <slot /> is that it requires deciding where in the footer to place that extra content. In your PR it’s between the pagination and credits components, but what if someone wants it at the top or below the credits? And it’s also additional documentation complexity: our other components don’t support this approach and we’d need to say how it behaved etc.

I think our documented pattern of placi…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@awhitford
Comment options

@delucis
Comment options

Answer selected by HiDeoo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants