SkipLink
The first stop of the Tab key: it jumps over the navigation to the content. It is visible only while it has the focus.
import { SkipLink } from '@sypnia/ui/react'
On this page
Skip to content
Click inside the box and press Tab.
Skip to content
The content starts here.
Code
import { SkipLink } from '@sypnia/ui/react';
// Press Tab inside this box: the link appears; Enter jumps to the content.
export default function Skip() {
return (
<div className="sy-stack">
<SkipLink href="#skip-target" />
<nav aria-label="Example navigation" className="sy-row"><a href="#a">Tables</a><a href="#b">SQL</a><a href="#c">Users</a></nav>
<p id="skip-target" tabIndex={-1}>The content starts here.</p>
</div>
);
} When to use it
Use it when
- Every page with navigation before the content. AppShell has one.
Do not use it when
- Hiding it for good: keyboard users need it.
For everyone
- It appears on focus at the top left, with the light.
- Its target must be focusable (
tabindex="-1").
Props
| SkipLink | Type | Default |
|---|---|---|
href | string | #main |