Skip to main content
BlocksGrid ListCompact card grid with initials and options menu

shadcn/ui Grid List blockCompact card grid with initials and options menu

A responsive three-column grid of compact shadcn/ui cards, each with a colored initials tile, a title link, a count line and a per-item dropdown menu. Built with the shadcn/ui Card, Button and DropdownMenu components. Great for pinned items, collections, playlists or quick-access lists in a dashboard.

Free@shadcnpro/grid-list-01

Preview

Installation

npx shadcn@latest add @shadcnpro/grid-list-01

First time? Add the @shadcnpro registry to components.json as shown in Installation. Free blocks install without a license key.

Let your AI editor install it

The shadcn/ui Pro MCP server lets Cursor, Claude Code and VS Code find and install blocks like Compact card grid with initials and options menu from one prompt. It is included in every Pro plan.

Add the shadcn/ui components

Compact card grid with initials and options menu uses Button, Card and Dropdown Menu.

npx shadcn@latest add button card dropdown-menu

Install the npm packages

npm install lucide-react

Copy the code

Paste it into components/blocks/grid-list-01.tsx.

components/blocks/grid-list-01.tsx
'use client';

import { MoreVerticalIcon } from 'lucide-react';
import { Button } from '@/components/ui/button';
import { Card, CardContent } from '@/components/ui/card';
import {
  DropdownMenu,
  DropdownMenuContent,
  DropdownMenuItem,
  DropdownMenuSeparator,
  DropdownMenuTrigger,
} from '@/components/ui/dropdown-menu';

const playlists = [
  { name: 'Night Shift Radio', initials: 'NS', href: '#', episodes: 48 },
  { name: 'Founders in Transit', initials: 'FT', href: '#', episodes: 31 },
  { name: 'The Harbour Sessions', initials: 'HS', href: '#', episodes: 19 },
];

export default function GridList01() {
  return (
    <div className="w-full max-w-4xl px-4">
      <h2 className="text-balance font-medium text-muted-foreground text-sm">
        Pinned shows
      </h2>
      <ul
        className="mt-3 grid grid-cols-1 gap-5 sm:gap-6 lg:grid-cols-3"
        role="list"
      >
        {playlists.map((show) => (
          <li className="col-span-1" key={show.name}>
            <Card className="flex w-full flex-row gap-0 overflow-hidden rounded-md py-0 shadow-xs">
              <div className="flex w-16 shrink-0 items-center justify-center bg-primary font-medium text-primary-foreground text-sm">
                {show.initials}
              </div>
              <CardContent className="flex flex-1 items-center justify-between truncate bg-card p-0">
                <div className="flex-1 truncate px-4 py-2 text-sm">
                  <a
                    className="font-medium text-foreground hover:text-muted-foreground"
                    href={show.href}
                  >
                    {show.name}
                  </a>
                  <p className="text-pretty text-muted-foreground">
                    {show.episodes} episodes
                  </p>
                </div>
                <div className="shrink-0 pr-2">
                  <DropdownMenu>
                    <DropdownMenuTrigger asChild>
                      <Button
                        className="rounded-full"
                        size="icon-sm"
                        type="button"
                        variant="ghost"
                      >
                        <span className="sr-only">Open options</span>
                        <MoreVerticalIcon className="size-5" />
                      </Button>
                    </DropdownMenuTrigger>
                    <DropdownMenuContent align="end">
                      <DropdownMenuItem>Open show</DropdownMenuItem>
                      <DropdownMenuItem>Edit details</DropdownMenuItem>
                      <DropdownMenuSeparator />
                      <DropdownMenuItem>Share RSS feed</DropdownMenuItem>
                      <DropdownMenuItem variant="destructive">
                        Unpin show
                      </DropdownMenuItem>
                    </DropdownMenuContent>
                  </DropdownMenu>
                </div>
              </CardContent>
            </Card>
          </li>
        ))}
      </ul>
    </div>
  );
}

Use it

Import it where you need it and update the import path to match your project.

Usage
import GridList01 from '@/components/blocks/grid-list-01';

export default function Page() {
  return <GridList01 />;
}

Overview

Compact card grid with initials and options menu is a free grid list block for shadcn/ui. It is built from the Button, Card and Dropdown Menu components with lucide-react, and installs as a single file you own and can edit.

It only uses semantic tokens such as bg-background, text-muted-foreground and border-border, so it follows your theme, radius and fonts and switches with dark mode. It is responsive from desktop to mobile; the width controls above the preview show each size. The same layout is in the shadcn/ui Pro Figma kit, so design and code start from one source.

Category
Grid List
Component library
Radix UI (radix-ui)
Also available for
Base UI, React Aria
Built with
Button, Card and Dropdown Menu
npm packages
lucide-react
Files
components/blocks/grid-list-01.tsx
Access
Free, installs without a license key

Frequently asked questions

Pricing, installation and Radix UI details for Compact card grid with initials and options menu.