Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Buyer and Seller Tabs Footer Block for React Aria

A marketplace footer with Buy and Sell tabs that swap the link groups and the closing action, for a handmade-goods market.

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 marketplace footer for React with React Aria, for Kilnby, a handmade-goods market. Buy and Sell tabs swap three link groups and the closing action: buyers get an outline Button ("Browse listings"), sellers get the Shine Button ("Start selling"). Both panels stay in the page, and an unseen copy of each holds the height of the taller one so the footer does not jump. The rails and the rules between the brand, the links and the legal band come from Guides. It's built from Tabs, Button, Shine Button and Guides.

FAQ

How do the Buy and Sell tabs work?

Two tabs, Buy and Sell. The arrow keys move between them. Choosing one shows that audience's three link groups and its action, and hides the other. Both panels stay in the HTML, so both audiences' links are in the markup. Each panel sets shouldForceMount. An unselected panel is inert, and data-[inert]:hidden hides it. An extra copy of both panels sits in the same grid cell, unseen and removed from keyboard and screen-reader reach, so the footer keeps the height of the taller panel.

Which button is the primary one?

Only one action is on screen. Buy shows an outline Button, "Browse listings". Sell shows the Shine Button, "Start selling". The other stays in the markup, hidden with its panel. Each button takes an href and renders a link.

How do screen readers move through it?

The block is a footer. The tabs are a tab list labelled Buy or sell. The open panel is a nav labelled Footer, each group a small h2 over a list. The closed panel is hidden, and the height-holding copy is inert, so only one Footer nav is announced. The policy links are a list named Legal. Every link and tab shows the theme's focus ring.

How does it fit on a phone?

The wordmark and the sentence come first, then the tabs at full width, then the three groups stacked (three in a row from sm), then the action, then the legal row. Nothing scrolls sideways at 320 pixels.

Where does the copyright year come from?

It is the current year, read when the footer renders, so it never goes stale. The block is a server component with no state, so on a server-rendered site the year is the server's when the page was built or rendered.