lailai0916

Skip Link

Navigation

About

An offscreen "skip to main content" link that becomes visible on keyboard focus so keyboard and screen-reader users can bypass repetitive navigation.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Skip Link to your project and fits it to your theme.

Code

How Skip Link is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

import SkipLink from "@/components/ui/skip-link";

export default function SkipLinkDemo() {
  return (
    <div className="relative flex h-screen w-full flex-col bg-background text-foreground">
      <SkipLink>Skip to content</SkipLink>
      <header className="flex items-center justify-between border-b border-border px-6 py-4">
        <span className="text-sm font-semibold">laikit UI</span>
        <nav
          aria-label="Primary"
          className="flex gap-4 text-sm text-muted-foreground"
        >
          <a href="#">Docs</a>
          <a href="#">Components</a>
          <a href="#">GitHub</a>
        </nav>
      </header>
      <main
        id="main-content"
        tabIndex={-1}
        className="flex flex-1 flex-col items-center justify-center gap-2 p-8 text-center"
      >
        <p className="text-sm font-medium">Press Tab, then Enter</p>
        <p className="max-w-sm text-sm text-muted-foreground">
          Tabbing from the top of the page reveals the hidden skip link;
          activating it jumps focus straight here, past the header navigation.
        </p>
      </main>
    </div>
  );
}

Dependencies

More by lailai0916

View all
  • Window Panel

    Window Panel

    12
  • Share Card

    Share Card

    3
  • Dialog

    Dialog

    2
  • Data Card

    Data Card

  • Traffic Lights

    Traffic Lights

  • Window Bar

    Window Bar

  • Tabs

    Tabs

  • Scrollable Data Table

    Scrollable Data Table

More in Navigation

View all
  • Footer with Big Wordmark

    Footer with Big Wordmark

    77
  • Liquid Glass Expandable Sidebar

    Liquid Glass Expandable Sidebar

    244
  • Sidebar

    Sidebar

    412
  • Button Breadcrumb

    Button Breadcrumb

    35
  • Menu

    Menu

    8
  • Pagination

    Pagination

    114
  • Pagination

    Pagination

    3
  • Oversized 404 Numeral

    Oversized 404 Numeral

    81