Components / Layout
SkipLink
A link, hidden until focused, that jumps keyboard users past repeated chrome to the main content (the target needs tabindex="-1").
@ruckc/truss-ui Layout
Import
import { SkipLink } from '@ruckc/truss-ui'; Playground
href
API
Also accepts every attribute of HTMLAnchorAttributes, applied to the underlying element.
| Prop | Type | Default | Description |
|---|---|---|---|
href | string | '#main' | Fragment of the main landmark. The target element needs `tabindex="-1"` so activating the link moves focus to it. |
children snippet | Snippet | — | Link text. Defaults to “Skip to content”. |
class | string | — |