Skip to content

Possible to use Search component on custom page? #2309

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

You must be logged in to vote

That’s not currently supported very easily because the search component relies on some values it expects to receive as props that it’s probably a bit tricky to recreate manually. We’re hoping to refactor some stuff to move those to Astro.locals instead of Astro.props which I think would unblock use cases like this.

If you’re really keen, you could try importing @astrojs/starlight/components/Search.astro and play until it is receiving all the required props, but it might not be the most fun experience 😁

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@rsimon
Comment options

Answer selected by rsimon
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