SkipLink
A native skip-navigation link revealed on focus and aimed at a page content target.
Preview
Skip to example content
The skip link moves keyboard focus here. Press Tab to continue.
Use SkipLink
SkipLink is a named export of @flood-md/react. Connect the package once, then import what you use.
Design notes
- Place SkipLink early in DOM order and point href at a nonempty same-page fragment. The target should have tabIndex=-1 (or already be focusable). Native fragment navigation updates the URL; the component then focuses and reveals the target.
- It stays visually hidden until focused. The click handler respects prevented events, modifier navigation and new-window targets. Reduced motion uses immediate scrolling. It does not create a focus trap or change the target tabindex.
- Original compatible addition in the unpublished 0.2.5 source candidate.
API reference
View TypeScript source