shadcn.io is not affiliated with official shadcn/ui
Accordion Footer Block for React
A footer where an accordion holds the links at every width: a brand half with the copyright, and four groups as rows between hairlines in the other half, one open at a time.
Installation
Overview
A footer for React with Base UI where the accordion is the footer at every width, not only on a phone. At the start, the wordmark and one sentence, with the copyright pinned to the foot. Behind a split divider, a nav labelled Footer holds four groups (Product, Resources, Company, Legal) as rows, each with its title and a count of its links, ruled from the divider to the rail with a + at both ends. One row is open at a time, the first on load. The divider runs from the page's top rule to the end of the page, like the rails. On a phone the halves stack and the rows run from rail to rail. It's built from Accordion, Guides and your theme's tokens.
FAQ
How do I change the groups and links?
Edit GROUPS at the top of the file: each group is an id, a title and its links (an href and a label); the count beside the title is the number of links, so it never needs editing. defaultValue on the Accordion names the group that is open on load. Every link is an anchor with href="#": point each at its page or use your router's link.
Why one group at a time?
It keeps the footer short: whichever group you open pushes the others down by one row, never by five. To let several stay open:
add multiple to the Accordion.
Are the closed groups' links in the page's markup?
Yes. The Accordion takes hiddenUntilFound, so closed groups stay in the markup as hidden="until-found" and the browser's find in page opens the one that holds a match.
How does it work with a keyboard and a screen reader?
Each row is a button inside its own heading, in a nav labelled Footer under the footer landmark. Tab moves from row to row and into the open group's links, Enter or Space opens and closes a row, and the button says whether it is expanded.
Related
- Pro
Mega Footer
Link gridsA mega footer for a cloud platform: a brand band, eight link groups with icons in two ruled bands of four on one desktop screen, an accordion on phones, and a legal band.
- Pro
Table of Contents Footer
Link gridsAn even two-column footer: the wordmark, description, social icons and legal line behind a divider from a numbered, two-column list of eight links.
- Pro
Link Columns Footer
Link gridsThe 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.
- Pro
Hairline Cells Link Directory Footer
Link gridsA brandless link directory: six groups of five links as cells on shared hairlines, three across by two down, with a legal band under the grid.
- Pro
Sitemap Filter Footer
Sitemaps and trailsA 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
Accordion FAQ
Accordion listsA side-header FAQ for a web analytics tool: the title, one sentence and a contact prompt beside seven questions in an accordion, behind a split divider.