Customize Styles for Partially Matched URLs With Gatsby’s Link Component

Share this video with your friends

Send Tweet

When viewing pages that partially match the to prop in a Gatsby Link component, it’s often desirable to show that page as “active”, such as when viewing an anchor link to a heading on the page, or showing the “blog” link as active when viewing /blog/my-great-post/. This video will show you how to pass a function to getProps and identify partial matches using the isPartiallyCurrent prop.