Staaarter

Module Cards Grid With Hover Lift

A feature section with a two-tone heading (a plain lead phrase followed by a primary-colored highlight phrase) above a responsive grid of clickable cards. Each card links out to its own page and shows a top-left accent-colored icon badge, a top-right diagonal arrow, a title, and a description. Cards lift and gain a shadow on hover.

By Staaarter Team
Feature
Docs
Live preview

Docs

Installation

A real shadcn registry command, not a copy-paste stand-in: it fetches this block plus its dependencies and any missing npm packages, and installs them straight into your project.

npx shadcn add https://staaarter.com/r/module-cards-grid-hover-lift.json

Prefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/feature/feature171.tsx instead.

Usage

The file also exports feature171Demo, the exact props behind the preview above. Spread it to get a working section in one line, then replace it with your own data.

import { Feature171, feature171Demo } from "@/components/blocks/feature/feature171";

export default function Page() {
  return <Feature171 {...feature171Demo} />;
}

Props

PropTypeDefaultDescription
eyebrowstringundefinedSmall label above the heading.
headingFeature171HeadingnoneLead phrase and a primary-colored highlight phrase rendered inline.
descriptionstringundefinedSupporting paragraph under the heading.
cardsFeature171Card[]noneClickable cards, each with its own icon, href, and accent color.
classNamestringnoneExtra classes for the outer section element.

Types

type Feature171Accent =
  | "emerald" | "primary" | "foreground" | "rose" | "blue"
  | "amber" | "violet" | "sky" | "orange" | "teal";

interface Feature171Card {
  icon: LucideIcon;
  title: string;
  description: string;
  href: string;
  accent: Feature171Accent;
}

interface Feature171Heading {
  lead: string;
  highlight: string;
}

Behavior notes

  • This is a plain Server Component: every card is a real <Link>, not a div with a click handler, so it stays keyboard- and screen-reader-navigable without any JavaScript.
  • The hover lift is a pure CSS transition (hover:-translate-y-1 hover:shadow-lg), there is no scroll- or intersection-triggered animation.
  • The accent color is a closed union type mapped to a fixed lookup of Tailwind classes, callers cannot pass an arbitrary color string.
  • The arrow icon in the top-right corner is decorative (aria-hidden) since the card's accessible name already comes from the link text.