Skip to content

Listings

Listings Tabs

A split title, category tabs and full listing cards — location, beds, baths, area, agent and price — with a button to all listings.

Layout and motion from the Findit template — see it in context

Installation

$ npx shadcn@latest add https://framebrick.co/r/blocks/listings-tabs.json

Usage

import { ListingsTabs } from "@/components/listings-tabs";

<ListingsTabs
  title="New on the market"
  categories={[
    { value: "houses", label: "Houses" },
    { value: "apartments", label: "Apartments" },
  ]}
  listings={[
    {
      title: "Garden Porch House",
      href: "/properties/garden-porch-house",
      image: { src: "/listings/porch.jpg", alt: "…" },
      category: { value: "houses", label: "Houses", href: "/properties?category=houses" },
      type: "For sale",
      location: "Maple Grove",
      beds: 4,
      baths: 3,
      area: "2,400 sqft",
      agent: { name: "Nora Lane", image: "/agents/nora.jpg", href: "/agents/nora-lane" },
      price: "$845,000",
    },
  ]}
  action={{ label: "View all properties", href: "/properties" }}
/>

Props

PropTypeDefaultDescription
labelstringLatest propertiesSmall muted line above the heading.
title / leadstring—Heading (h2) and the lead beside it from 768px (up to 400px).
categories{ value, label }[]3 categoriesOne tab each after the "all" tab. Pass [] for a plain list without tabs.
allLabelstringView allThe first tab, showing every listing.
listingsTabListing[]7 listings{ title, href, image, category: { value, label, href? }, type?, location, beds, baths, area, agent?, price }.
limitnumber6Cards shown for a tab.
action{ label, href }—Button under the cards; omit to hide it.
classNamestring—Classes for the <section>.
  • The tabs are a segmented control: the selected fill slides to the chosen tab, arrow keys move between tabs, and the list swaps at once (as in Framer).
  • Cards: one column, two from 768px, three from 1024px. Hovering a card grows its photo to 105% (zoom-card); the photo link repeats the title link, so it is hidden from assistive tech and the keyboard.

AI prompt

Paste into v0, Lovable, Bolt or Claude to rebuild this block in your own project.

Create a React + Tailwind CSS block called ListingsTabs (Next.js, client component).
- <section className="py-(--section-y)">, container mx-auto max-w-(--container) px-(--gutter), column gap-12, items-start.
- Split title: a small muted label and an h2 (font-heading text-h2 semibold); beside it from 768px (items-end) a muted lead up to 400px.
- Tabs: a segmented control (radiogroup; rounded-lg bg-muted p-[3px]; the selected option on bg-background with a shadow that slides between
  options with a spring) with "View all" and one option per category; the grid below shows the first six listings of the chosen category.
- Grid gap-5: 1 / 2 (768px) / 3 (1024px) columns. Card (rounded-xl bg-muted, overflow-hidden): a 350px photo that zooms to 1.05 on hover (400ms,
  cubic-bezier(0.12,0.23,0.5,1)) inside an aria-hidden link, chips at its top-left (category bg-primary, a link; type bg-background); then p-5:
  a muted location with a pin icon, the h3 title (font-heading text-lg) and a <dl> of Beds / Baths / Area with icons (muted terms, foreground
  values), as one link; a border-t row with the agent (40px round photo and name, a link) and the price (font-heading text-lg).
- A button under the grid whose label rolls on hover. Only shadcn variables and block tokens (secondary text on bg-muted is text-foreground/65: muted-foreground
  falls under 4.5:1 there); plain <img> with alt text.

Be the first to know

Get new templates and components first

One short email when we release a template or a free component. No spam — unsubscribe anytime.

We use your email only for Framebrick updates. Privacy policy