Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Documentation Footer Block for React

A documentation footer for a router library's docs: previous and next page cells, an Edit this page link with a pencil, four link groups and a legal band.

Framework
UI library

Preview

Preview width

Installation

Part of Pro
Pro unlocks the code and one-line install of every Pro button and text effect, plus the MCP for your AI editor.
Have Pro already? Sign in to open it.Opens here as soon as you're Pro.

Overview

A documentation footer for React with Base UI. It repeats the docs layout at the foot of a page: first the page before and the page after, as two cells with overshoot lines and + marks, then a ruled row with an Edit this page link and a pencil, then the wordmark beside four link groups (Getting started, Guides, API reference, Examples) in the nav labelled Footer, and a legal band. It's built from Guides, plain links and your theme's tokens, and it is a static component with no state.

FAQ

How does a previous or next cell work?

The page's title is the link, and its box is stretched over the whole cell with an ::after pseudo-element, so a click or tap anywhere in the cell follows it while a screen reader meets one link per cell, named by the page title. The keyboard focus ring is drawn on that box, inside the cell. Previous sits at the start of the row and Next at the end, and their arrows mirror in a right-to-left layout.

How do I set the neighbouring pages?

Edit the PREVIOUS and NEXT constants at the top of the file: each has a title, a one-line detail and an href. On the first page of a guide there is no previous page: delete the Previous cell and give the Next cell md:col-start-2, so it keeps its place at the end.

Where does Edit this page go?

Point its href at the page's source in your repository (the URL that opens the file in an editor). It sits in its own ruled row so it reads as an action on this page, apart from the site-wide links under it.

Why aren't the page cells a second nav?

A footer keeps one navigation landmark, labelled Footer, for the site's links. The two cells are a short list named "Neighbouring pages" under a heading that only screen readers see ("Keep reading"), so they are announced as part of the footer without adding a landmark.

How does it fit on a phone?

The two cells stack, the groups sit two by two under the wordmark, and the legal row stacks. The cells are kept apart (1.5 rem, 2 rem from md) so their overshoot lines never touch, and nothing scrolls sideways at 320 pixels.

  • Pro

    Breadcrumb Footer

    Sitemaps and trails

    A breadcrumb footer for a CI service's docs: a trail band ending on the current page, three link groups in hairline columns and a foot band with the wordmark and policies.

  • Pro

    Developer Hub Footer

    Products and catalogs

    A developer-hub footer for a secrets manager: SDK tabs (TypeScript, Python, Go) with an install command, a copy button and the version, beside three link groups.

  • Pro

    FAQ Links Footer

    Content and updates

    An FAQ-links footer for a tax-prep app: five common questions as ruled link rows with a chevron and an All answers link, beside two link groups.

  • Pro

    A footer that asks whether the page was helpful: a Yes and No toggle that opens a note form with validation, a status line that thanks the reader, and two link columns.

  • Pro

    Sitemap Filter Footer

    Sitemaps and trails

    A sitemap footer for a documentation host: a search field that filters 36 links across six columns as you type, with a live count and a clear button.

  • Pro

    The classic link-column footer for an email API: a brand column with the wordmark, one sentence and four social links, four groups of links behind a split divider, and a legal band with the copyright and the policy links.