Grayscale Carousel

A sleek carousel showcasing testimonials.

Preview

Code

Code

app/page.tsx

1// This is premium content 2// Upgrade to Pro or Agency plan to access the full code 3// 4// Features included: 5// - Complete implementation 6// - Advanced animations 7// - Performance optimizations 8// - TypeScript support 9// - Responsive design 10// 11// Get access now at /pricing 12 13const PremiumComponent = () => { 14 return ( 15 <div> 16 <h1>Premium Content</h1> 17 <p>Upgrade to unlock this component</p> 18 </div> 19 ); 20}; 21 22export default PremiumComponent;

Installation

Initialized a project and installed the necessary dependencies to use this component.

1. Initialize a new Next.js project:

Code
npx create-next-app@latest my-app

2. Install Framer Motion

Code
npm install framer-motion

3. Install Shadcn

Code
npx shadcn@latest init

4. Install Shadcn Carousel Component

Code
npx shadcn@latest add carousel

Add Testimonials Section

Code

src/sections/testimonials.tsx

1// This is premium content 2// Upgrade to Pro or Agency plan to access the full code 3// 4// Features included: 5// - Complete implementation 6// - Advanced animations 7// - Performance optimizations 8// - TypeScript support 9// - Responsive design 10// 11// Get access now at /pricing 12 13const PremiumComponent = () => { 14 return ( 15 <div> 16 <h1>Premium Content</h1> 17 <p>Upgrade to unlock this component</p> 18 </div> 19 ); 20}; 21 22export default PremiumComponent;

Add Testimonial Carousel Component

Code

src/components/common/testimonials-carousel.tsx

1// This is premium content 2// Upgrade to Pro or Agency plan to access the full code 3// 4// Features included: 5// - Complete implementation 6// - Advanced animations 7// - Performance optimizations 8// - TypeScript support 9// - Responsive design 10// 11// Get access now at /pricing 12 13const PremiumComponent = () => { 14 return ( 15 <div> 16 <h1>Premium Content</h1> 17 <p>Upgrade to unlock this component</p> 18 </div> 19 ); 20}; 21 22export default PremiumComponent;

Add Testimonials Card Component

Code

src/components/common/testimonial-card.tsx

1// This is premium content 2// Upgrade to Pro or Agency plan to access the full code 3// 4// Features included: 5// - Complete implementation 6// - Advanced animations 7// - Performance optimizations 8// - TypeScript support 9// - Responsive design 10// 11// Get access now at /pricing 12 13const PremiumComponent = () => { 14 return ( 15 <div> 16 <h1>Premium Content</h1> 17 <p>Upgrade to unlock this component</p> 18 </div> 19 ); 20}; 21 22export default PremiumComponent;

Update Shadcn Carousel Component

Code

src/components/ui/carousel.tsx

1// This is premium content 2// Upgrade to Pro or Agency plan to access the full code 3// 4// Features included: 5// - Complete implementation 6// - Advanced animations 7// - Performance optimizations 8// - TypeScript support 9// - Responsive design 10// 11// Get access now at /pricing 12 13const PremiumComponent = () => { 14 return ( 15 <div> 16 <h1>Premium Content</h1> 17 <p>Upgrade to unlock this component</p> 18 </div> 19 ); 20}; 21 22export default PremiumComponent;

Add Constants

Code

src/constants/index.ts

1export const allTestimonials = [ 2 { 3 name: "Sofia Papadopoulou", 4 title: "CEO of Autism Spectrum Reach", 5 src: "/assets/testimonial-1.png", 6 testimonial: 7 "Orion consistently delivers top-quality work and guided our team on brand implementation. His strategy workshop was engaging and results-driven, and his process was seamless and flexible throughout.", 8 }, 9 { 10 name: "Lucas Moretti", 11 title: "Head of Product at FinEdge", 12 src: "/assets/testimonial-2.png", 13 testimonial: 14 "Working with Orion was a game changer for our product launch. His attention to detail and creative solutions exceeded our expectations. We saw immediate results in user engagement!", 15 }, 16 { 17 name: "Ava Chen", 18 title: "Founder of NovaWear", 19 src: "/assets/testimonial-3.png", 20 testimonial: 21 "Orion’s expertise in branding and design helped us stand out in a crowded market. The process was smooth, collaborative, and inspiring from start to finish.", 22 }, 23 { 24 name: "David Okafor", 25 title: "CTO of EduSpark", 26 src: "/assets/testimonial-4.png", 27 testimonial: 28 "We appreciated Orion’s strategic approach and technical know-how. Our new platform is faster, more intuitive, and our team learned a lot from the experience.", 29 }, 30 { 31 name: "Sofia Papadopoulou", 32 title: "CEO of Autism Spectrum Reach", 33 src: "/assets/testimonial-5.png", 34 testimonial: 35 "Orion consistently delivers top-quality work and guided our team on brand implementation. His strategy workshop was engaging and results-driven, and his process was seamless and flexible throughout.", 36 }, 37 { 38 name: "Lucas Moretti", 39 title: "Head of Product at FinEdge", 40 src: "/assets/testimonial-6.png", 41 testimonial: 42 "Working with Orion was a game changer for our product launch. His attention to detail and creative solutions exceeded our expectations. We saw immediate results in user engagement!", 43 }, 44 { 45 name: "Ava Chen", 46 title: "Founder of NovaWear", 47 src: "/assets/testimonial-7.png", 48 testimonial: 49 "Orion’s expertise in branding and design helped us stand out in a crowded market. The process was smooth, collaborative, and inspiring from start to finish.", 50 }, 51 { 52 name: "David Okafor", 53 title: "CTO of EduSpark", 54 src: "/assets/testimonial-8.png", 55 testimonial: 56 "We appreciated Orion’s strategic approach and technical know-how. Our new platform is faster, more intuitive, and our team learned a lot from the experience.", 57 }, 58]; 59

Add Styles

Code

src/globals.css

1@import "tailwindcss"; 2@import "tw-animate-css"; 3 4@custom-variant dark (&:is(.dark *)); 5 6@theme inline { 7 --color-background: var(--background); 8 --color-foreground: var(--foreground); 9 --font-sans: var(--font-geist-sans); 10 --font-mono: var(--font-geist-mono); 11 --color-sidebar-ring: var(--sidebar-ring); 12 --color-sidebar-border: var(--sidebar-border); 13 --color-sidebar-accent-foreground: var(--sidebar-accent-foreground); 14 --color-sidebar-accent: var(--sidebar-accent); 15 --color-sidebar-primary-foreground: var(--sidebar-primary-foreground); 16 --color-sidebar-primary: var(--sidebar-primary); 17 --color-sidebar-foreground: var(--sidebar-foreground); 18 --color-sidebar: var(--sidebar); 19 --color-chart-5: var(--chart-5); 20 --color-chart-4: var(--chart-4); 21 --color-chart-3: var(--chart-3); 22 --color-chart-2: var(--chart-2); 23 --color-chart-1: var(--chart-1); 24 --color-ring: var(--ring); 25 --color-input: var(--input); 26 --color-border: var(--border); 27 --color-destructive: var(--destructive); 28 --color-accent-foreground: var(--accent-foreground); 29 --color-accent: var(--accent); 30 --color-muted-foreground: var(--muted-foreground); 31 --color-muted: var(--muted); 32 --color-secondary-foreground: var(--secondary-foreground); 33 --color-secondary: var(--secondary); 34 --color-primary-foreground: var(--primary-foreground); 35 --color-primary: var(--primary); 36 --color-popover-foreground: var(--popover-foreground); 37 --color-popover: var(--popover); 38 --color-card-foreground: var(--card-foreground); 39 --color-card: var(--card); 40 --radius-sm: calc(var(--radius) - 4px); 41 --radius-md: calc(var(--radius) - 2px); 42 --radius-lg: var(--radius); 43 --radius-xl: calc(var(--radius) + 4px); 44} 45 46:root { 47 --radius: 0.625rem; 48 --background: oklch(0% 0 0); 49 --foreground: oklch(100% 0.00011 271.152); 50 --card: oklch(1 0 0); 51 --card-foreground: oklch(0.145 0 0); 52 --popover: oklch(1 0 0); 53 --popover-foreground: oklch(0.145 0 0); 54 --primary: oklch(0.205 0 0); 55 --primary-foreground: oklch(0.985 0 0); 56 --secondary: oklch(0.97 0 0); 57 --secondary-foreground: oklch(0.205 0 0); 58 --muted: oklch(0.97 0 0); 59 --muted-foreground: oklch(0.556 0 0); 60 --accent: oklch(0.97 0 0); 61 --accent-foreground: oklch(0.205 0 0); 62 --destructive: oklch(0.577 0.245 27.325); 63 --border: oklch(0.922 0 0); 64 --input: oklch(0.922 0 0); 65 --ring: oklch(0.708 0 0); 66 --chart-1: oklch(0.646 0.222 41.116); 67 --chart-2: oklch(0.6 0.118 184.704); 68 --chart-3: oklch(0.398 0.07 227.392); 69 --chart-4: oklch(0.828 0.189 84.429); 70 --chart-5: oklch(0.769 0.188 70.08); 71 --sidebar: oklch(0.985 0 0); 72 --sidebar-foreground: oklch(0.145 0 0); 73 --sidebar-primary: oklch(0.205 0 0); 74 --sidebar-primary-foreground: oklch(0.985 0 0); 75 --sidebar-accent: oklch(0.97 0 0); 76 --sidebar-accent-foreground: oklch(0.205 0 0); 77 --sidebar-border: oklch(0.922 0 0); 78 --sidebar-ring: oklch(0.708 0 0); 79} 80 81.dark { 82 --background: oklch(0% 0 0); 83 --foreground: oklch(100% 0.00011 271.152); 84 --card: oklch(0.205 0 0); 85 --card-foreground: oklch(0.985 0 0); 86 --popover: oklch(0.205 0 0); 87 --popover-foreground: oklch(0.985 0 0); 88 --primary: oklch(0.922 0 0); 89 --primary-foreground: oklch(0.205 0 0); 90 --secondary: oklch(0.269 0 0); 91 --secondary-foreground: oklch(0.985 0 0); 92 --muted: oklch(0.269 0 0); 93 --muted-foreground: oklch(0.708 0 0); 94 --accent: oklch(0.269 0 0); 95 --accent-foreground: oklch(0.985 0 0); 96 --destructive: oklch(0.704 0.191 22.216); 97 --border: oklch(1 0 0 / 10%); 98 --input: oklch(1 0 0 / 15%); 99 --ring: oklch(0.556 0 0); 100 --chart-1: oklch(0.488 0.243 264.376); 101 --chart-2: oklch(0.696 0.17 162.48); 102 --chart-3: oklch(0.769 0.188 70.08); 103 --chart-4: oklch(0.627 0.265 303.9); 104 --chart-5: oklch(0.645 0.246 16.439); 105 --sidebar: oklch(0.205 0 0); 106 --sidebar-foreground: oklch(0.985 0 0); 107 --sidebar-primary: oklch(0.488 0.243 264.376); 108 --sidebar-primary-foreground: oklch(0.985 0 0); 109 --sidebar-accent: oklch(0.269 0 0); 110 --sidebar-accent-foreground: oklch(0.985 0 0); 111 --sidebar-border: oklch(1 0 0 / 10%); 112 --sidebar-ring: oklch(0.556 0 0); 113} 114 115@layer base { 116 * { 117 @apply border-border outline-ring/50; 118 } 119 body { 120 @apply bg-background text-foreground; 121 } 122}

Become an Astrae
Affiliate Today

Make referrals, and bring in clients. Keep 50% of your earnings paid out weekly.

Description