# Quote With Project Context

> A testimonial paired with the project it refers to, including a thumbnail and link. Use it to tie praise directly to the work that earned it on a case study.

A shadcn/ui block from the [@shadcn-ui-blocks](https://www.shadcn-ui-blocks.com) registry, listed on [shadcn.exchange](https://shadcn.exchange/r/shadcn-ui-blocks/portfolio-portfolio-quote-and-feedback-quote-with-project-context).

- Page, with a live preview: https://shadcn.exchange/r/shadcn-ui-blocks/portfolio-portfolio-quote-and-feedback-quote-with-project-context
- Screenshot: https://abzjhwgwpdpz7ua5.public.blob.vercel-storage.com/shots/shadcn-ui-blocks/portfolio-portfolio-quote-and-feedback-quote-with-project-context-light-1fcc38a38ad91ec4.png
- Registry item: https://www.shadcn-ui-blocks.com/r/portfolio-portfolio-quote-and-feedback-quote-with-project-context.json
- Listed: 2026-10-13, source last changed 2026-10-13

## Install

```bash
npx shadcn@latest add https://www.shadcn-ui-blocks.com/r/portfolio-portfolio-quote-and-feedback-quote-with-project-context.json
```

Run it in a project that has shadcn/ui set up. It adds the files below and installs what they depend on.

## Dependencies

- npm packages: `class-variance-authority`, `radix-ui`

## Files

### `components/blocks/portfolio/portfolio-quote-and-feedback/quote-with-project-context.tsx`

```tsx
import { Badge } from '@/components/ui/badge';

export default function QuoteWithProjectContext() {
  const testimonials = [
    {
      quote:
        'The rebrand completely transformed how our customers perceive us. The strategic insights combined with outstanding design execution delivered results beyond our expectations.',
      name: 'Jessica Rivera',
      title: 'Marketing VP, GreenTech Solutions',
      projectName: 'GreenTech Brand Transformation',
      projectType: 'Brand Identity',
      projectImage:
        'https://images.unsplash.com/photo-1618761714954-0b8cd0026356?q=80&w=1000&auto=format&fit=crop',
      clientImage:
        'https://images.unsplash.com/photo-1508214751196-bcfd4ca60f91?q=80&w=1000&auto=format&fit=crop',
    },
    {
      quote:
        'The website redesign resulted in a 65% increase in user engagement and a 40% reduction in bounce rate. Their focus on user experience and conversion optimization was exactly what we needed.',
      name: 'Thomas Grant',
      title: 'CEO, Elevate Finance',
      projectName: 'Elevate Finance Platform',
      projectType: 'Web Design & Development',
      projectImage:
        'https://images.unsplash.com/photo-1460925895917-afdab827c52f?q=80&w=1000&auto=format&fit=crop',
      clientImage:
        'https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?q=80&w=1000&auto=format&fit=crop',
    },
  ];

  return (
    <section className="w-full py-12 md:py-24 lg:py-32">
      <div className="container mx-auto px-4 md:px-6">
        <div className="flex flex-col items-center space-y-4 text-center">
          <div className="space-y-2">
            <h2 className="text-3xl font-bold tracking-tighter sm:text-4xl md:text-5xl">
              Client Success <span className="text-primary">Stories</span>
            </h2>
            <p className="text-muted-foreground mx-auto max-w-[700px] md:text-xl/relaxed">
              Real feedback from real clients on real projects
            </p>
          </div>
        </div>

        <div className="mt-16 space-y-16">
          {testimonials.map((testimonial, index) => (
            <div
              key={index}
              className="grid grid-cols-1 items-center gap-8 lg:grid-cols-2"
            >
              <div
                className={`order-2 ${index % 2 !== 0 ? 'lg:order-1' : 'lg:order-2'}`}
              >
                <blockquote className="border-primary relative border-l-4 py-2 pl-6">
                  <p className="mb-6 text-xl leading-relaxed italic">
                    &ldquo;{testimonial.quote}&rdquo;
                  </p>
                  <div className="flex items-center gap-4">
                    <div className="relative h-12 w-12 overflow-hidden rounded-full">
                      <img
                        src={testimonial.clientImage}
                        alt={testimonial.name}
                        className="object-cover"
                      />
                    </div>
                    <div>
                      <p className="font-semibold">{testimonial.name}</p>
                      <p className="text-muted-foreground text-sm">
                        {testimonial.title}
                      </p>
                    </div>
                  </div>
                </blockquote>
              </div>

              <div
                className={`order-1 ${index % 2 !== 0 ? 'lg:order-2' : 'lg:order-1'}`}
              >
                <a
                  href="#"
                  className="group block overflow-hidden rounded-xl shadow-lg transition-all hover:shadow-xl"
                >
                  <div className="relative aspect-video w-full overflow-hidden">
                    <img
                      src={testimonial.projectImage}
                      alt={testimonial.projectName}
                      className="object-cover transition-transform duration-300 group-hover:scale-105"
                    />
                    <div className="absolute inset-0 bg-gradient-to-t from-black/70 via-black/20 to-transparent opacity-90"></div>
                    <div className="absolute bottom-0 left-0 z-10 p-6 text-white">
                      <Badge variant="secondary" className="mb-2">
                        {testimonial.projectType}
                      </Badge>
                      <h3 className="text-2xl font-bold">
                        {testimonial.projectName}
                      </h3>
                      <p className="mt-2 font-medium text-white/80">
                        View Project &rarr;
                      </p>
                    </div>
                  </div>
                </a>
              </div>
            </div>
          ))}
        </div>
      </div>
    </section>
  );
}
```

### `components/ui/badge.tsx`

```tsx
import * as React from "react"
import { cva, type VariantProps } from "class-variance-authority"
import { Slot } from "radix-ui"

import { cn } from "@/lib/utils"

const badgeVariants = cva(
  "group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",
  {
    variants: {
      variant: {
        default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80",
        secondary:
          "bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",
        destructive:
          "bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",
        outline:
          "border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",
        ghost:
          "hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",
        link: "text-primary underline-offset-4 hover:underline",
      },
    },
    defaultVariants: {
      variant: "default",
    },
  }
)

function Badge({
  className,
  variant = "default",
  asChild = false,
  ...props
}: React.ComponentProps<"span"> &
  VariantProps<typeof badgeVariants> & { asChild?: boolean }) {
  const Comp = asChild ? Slot.Root : "span"

  return (
    <Comp
      data-slot="badge"
      data-variant={variant}
      className={cn(badgeVariants({ variant }), className)}
      {...props}
    />
  )
}

export { Badge, badgeVariants }
```
