← GalleryDownload source code
- Category
- Shaders
- Tier
- Free
- Prompt
- 482 words
- Includes
- Prompt + source code
Shaders
Dithered Hero Card — Retro Grain
reacttailwindtypescriptvite
The prompt
# HERO DITHERING CARD — COMPONENT INTEGRATION
YOU ARE GIVEN A TASK TO INTEGRATE AN EXISTING REACT COMPONENT IN THE CODEBASE
THE CODEBASE SHOULD SUPPORT:
- SHADCN PROJECT STRUCTURE
- TAILWIND CSS
- TYPESCRIPT
IF IT DOESN'T, PROVIDE INSTRUCTIONS ON HOW TO SETUP PROJECT VIA SHADCN CLI, INSTALL TAILWIND OR TYPESCRIPT.
DETERMINE THE DEFAULT PATH FOR COMPONENTS AND STYLES.
IF DEFAULT PATH FOR COMPONENTS IS NOT /COMPONENTS/UI, PROVIDE INSTRUCTIONS ON WHY IT'S IMPORTANT TO CREATE THIS FOLDER
COPY-PASTE THIS COMPONENT TO /COMPONENTS/UI FOLDER:
```tsx
hero-dithering-card.tsx
import { ArrowRight } from "lucide-react"
import { useState, Suspense, lazy } from "react"
const Dithering = lazy(() =>
import("@paper-design/shaders-react").then((mod) => ({ default: mod.Dithering }))
)
export function CTASection() {
const [isHovered, setIsHovered] = useState(false)
return (
<section className="py-12 w-full flex justify-center items-center px-4 md:px-6">
<div
className="w-full max-w-7xl relative"
onMouseEnter={() => setIsHovered(true)}
onMouseLeave={() => setIsHovered(false)}
>
<div className="relative overflow-hidden rounded-[48px] border border-border bg-card shadow-sm min-h-[600px] md:min-h-[600px] flex flex-col items-center justify-center duration-500">
<Suspense fallback={<div className="absolute inset-0 bg-muted/20" />}>
<div className="absolute inset-0 z-0 pointer-events-none opacity-40 dark:opacity-30 mix-blend-multiply dark:mix-blend-screen">
<Dithering
colorBack="#00000000" // Transparent
colorFront="#EC4E02" // Accent
shape="warp"
type="4x4"
speed={isHovered ? 0.6 : 0.2}
className="size-full"
minPixelRatio={1}
/>
</div>
</Suspense>
<div className="relative z-10 px-6 max-w-4xl mx-auto text-center flex flex-col items-center">
<div className="mb-8 inline-flex items-center gap-2 rounded-full border border-primary/10 bg-primary/5 px-4 py-1.5 text-sm font-medium text-primary backdrop-blur-sm">
<span className="relative flex h-2 w-2">
<span className="animate-ping absolute inline-flex h-full w-full rounded-full bg-primary opacity-75"></span>
<span className="relative inline-flex rounded-full h-2 w-2 bg-primary"></span>
</span>
AI-Powered Writing
</div>
{/* Headline */}
<h2 className="font-serif text-5xl md:text-7xl lg:text-8xl font-medium tracking-tight text-foreground mb-8 leading-[1.05]">
Your words, <br />
<span className="text-foreground/80">delivered perfectly.</span>
</h2>
{/* Description */}
<p className="text-muted-foreground text-lg md:text-xl max-w-2xl mb-12 leading-relaxed">
Join 2,847 founders using the only AI that understands the nuance of your voice.
Clean, precise, and uniquely yours.
</p>
{/* Button */}
<button className="group relative inline-flex h-14 items-center justify-center gap-3 overflow-hidden rounded-full bg-primary px-12 text-base font-medium text-primary-foreground transition-all duration-300 hover:bg-primary/90 hover:scale-105 active:scale-95 hover:ring-4 hover:ring-primary/20">
<span className="relative z-10">Start Typing</span>
<ArrowRight className="h-5 w-5 relative z-10 transition-transform duration-300 group-hover:translate-x-1" />
</button>
</div>
</div>
</div>
</section>
)
}
demo.tsx
import { CTASection } from "@/components/ui/hero-dithering-card";
export default function DemoOne() {
return <CTASection />;
}
```
INSTALL NPM DEPENDENCIES:
```bash
lucide-react
```
## IMPLEMENTATION GUIDELINES
1. ANALYZE THE COMPONENT STRUCTURE AND IDENTIFY ALL REQUIRED DEPENDENCIES
2. REVIEW THE COMPONENT'S ARGUMENS AND STATE
3. IDENTIFY ANY REQUIRED CONTEXT PROVIDERS OR HOOKS AND INSTALL THEM
4. QUESTIONS TO ASK
- WHAT DATA/PROPS WILL BE PASSED TO THIS COMPONENT?
- ARE THERE ANY SPECIFIC STATE MANAGEMENT REQUIREMENTS?
- ARE THERE ANY REQUIRED ASSETS (IMAGES, ICONS, ETC.)?
- WHAT IS THE EXPECTED RESPONSIVE BEHAVIOR?
- WHAT IS THE BEST PLACE TO USE THIS COMPONENT IN THE APP?
## STEPS TO INTEGRATE
0. COPY PASTE ALL THE CODE ABOVE IN THE CORRECT DIRECTORIES
1. INSTALL EXTERNAL DEPENDENCIES
2. FILL IMAGE ASSETS WITH UNSPLASH STOCK IMAGES YOU KNOW EXIST
3. USE LUCIDE-REACT ICONS FOR SVGS OR LOGOS IF COMPONENT REQUIRES THEM



