Card Image Section
roi-ui/card-image-sectionFreeItem
A section with 4 image cards in a masonry layout.
Install it
npx shadcn@latest add https://roiui.com/r/card-image-section.jsonSource
1import { ArrowPointer, Button } from "@/registry/brook/ui/button/button";2import { Card, CardContent, CardDescription, CardFooter, CardImage, CardTitle } from "@/registry/brook/ui/card/card";3import styles from "./card-image-section.module.css";45type CardData = {6 id: number;7 imageSrc: string;8 alt: string;9 title: string;10 description: string;11 href?: string;12};1314type CardImageSectionProps = {15 data: {16 caption: string;17 heading: string;18 description: string;19 cards: CardData[];20 };21};2223export function CardImageSection({ data }: CardImageSectionProps) {24 return (25 <section className={styles.section}>26 <header className={styles.header}>27 <span className={styles.caption}>{data.caption}</span>28 <h2 className={styles.heading}>{data.heading}</h2>29 <p className={styles.description}>{data.description}</p>30 </header>3132 <div className={styles.grid}>33 {data.cards.map((card) => (34 <Card className={styles.card} key={card.id} variant="lift">35 <CardImage alt={card.alt} className={styles.cardImage} src={card.imageSrc} />3637 <CardContent>38 <CardTitle className={styles.cardTitle}>{card.title}</CardTitle>39 <CardDescription>{card.description}</CardDescription>40 </CardContent>4142 <CardFooter>43 <Button className={styles.linkButton} render={<a href={card.href ?? "#"} />} size="sm" variant="link">44 Learn More45 <ArrowPointer />46 </Button>47 </CardFooter>48 </Card>49 ))}50 </div>51 </section>52 );53}
What it pulls in
Other registry items
Files it writes
More from Roi UI
All 123 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Accordionaccordion | Roi UI | Other | Free | no deps · 2 files | |
| Accordion (Tailwind)accordion-tailwind | Roi UI | Other | Free | no deps | |
| AI Chatai-chat | Roi UI | Other | Free | no deps · 2 files | |
| AI Chat (Tailwind)ai-chat-tailwind | Roi UI | Other | Free | no deps | |
| Alertalert | Roi UI | Other | Free | 1 dep · 2 files | |
| Alert Dialogalert-dialog | Roi UI | Other | Free | no deps · 2 files | |
| Alert Dialog (Tailwind)alert-dialog-tailwind | Roi UI | Other | Free | no deps | |
| Alert (Tailwind)alert-tailwind | Roi UI | Other | Free | 1 dep |
