articles-3
fulldev-ui/articles-3FreeBlock
fulldev/ui publishes no description for this item.
Live preview
live · rendered by the registry
Rendered by fulldev/ui on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://ui.full.dev/r/articles-3.jsonSource
1---2import type { ImageMetadata } from "astro"3import { Image } from "astro:assets"45import { cn } from "@/lib/utils"6import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar"7import { Badge } from "@/components/ui/badge"8import { Section, SectionContainer } from "@/components/ui/section"910type Props = {11 class?: string12 badge?: string13 title: string14 articles: {15 image: {16 src: ImageMetadata17 alt: string18 }19 category: string20 title: string21 description: string22 href?: string23 author: {24 image?: ImageMetadata25 initials: string26 name: string27 date: string28 }29 }[]30}3132const { class: className, badge, title, articles } = Astro.props33---3435<Section class={cn("", className)}>36 <SectionContainer class="gap-8">37 <div class="flex flex-wrap items-end justify-between gap-4">38 <div class="flex flex-col gap-4">39 {40 badge && (41 <Badge variant="secondary" class="w-fit">42 {badge}43 </Badge>44 )45 }46 <h247 class="text-3xl font-semibold tracking-tight text-balance sm:text-4xl"48 >49 {title}50 </h2>51 </div>52 </div>5354 <div class="grid gap-6 md:grid-cols-2 lg:grid-cols-4">55 {56 articles.map((article) => (57 <a58 href={article.href ?? "#"}59 class="group bg-muted/50 hover:bg-muted focus-visible:ring-ring/50 flex h-full flex-col gap-4 rounded-xl p-4 transition-colors focus-visible:ring-2 focus-visible:outline-none"60 >61 <Image62 src={article.image.src}63 alt={article.image.alt}64 class="-mx-4 -mt-4 aspect-video w-[calc(100%+2rem)] max-w-none rounded-lg object-cover transition-opacity group-hover:opacity-85"65 widths={[480, 720]}66 sizes="(min-width: 64rem) 18rem, (min-width: 48rem) 50vw, 100vw"67 />68 <div class="flex flex-col gap-2">69 <p class="text-muted-foreground text-sm font-medium">70 {article.category}71 </p>72 <h3 class="text-foreground line-clamp-2 text-lg leading-snug font-semibold">73 {article.title}74 </h3>75 <p class="text-muted-foreground line-clamp-2 text-sm leading-6">76 {article.description}77 </p>78 </div>79 <div class="mt-auto flex items-center gap-3">80 <Avatar>81// … truncated
What it pulls in
Other registry items
Files it writes
More from fulldev/ui
All 144 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| article-1article-1 | fulldev/ui | Blocks | Free | no deps | |
| article-2article-2 | fulldev/ui | Blocks | Free | no deps | |
| articles-1articles-1 | fulldev/ui | Blocks | Free | no deps | |
| articles-2articles-2 | fulldev/ui | Blocks | Free | no deps | |
| articles-4articles-4 | fulldev/ui | Blocks | Free | no deps | |
| banner-1banner-1 | fulldev/ui | Blocks | Free | no deps | |
| banner-2banner-2 | fulldev/ui | Blocks | Free | no deps | |
| blocks-1blocks-1 | fulldev/ui | Blocks | Free | no deps |
