articles-4
fulldev-ui/articles-4FreeBlock
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-4.jsonSource
1---2import type { ImageMetadata } from "astro"34import { cn } from "@/lib/utils"5import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar"6import { Badge } from "@/components/ui/badge"7import { Section, SectionContainer } from "@/components/ui/section"89type Props = {10 class?: string11 badge?: string12 title: string13 description: string14 articles: {15 category: string16 title: string17 description: string18 href?: string19 author: {20 image?: ImageMetadata21 initials: string22 name: string23 date: string24 }25 }[]26}2728const { class: className, badge, title, description, articles } = Astro.props29---3031<Section class={cn("", className)}>32 <SectionContainer class="gap-8">33 <div class="mx-auto max-w-2xl text-center">34 {badge && <Badge variant="secondary">{badge}</Badge>}35 <h236 class={cn(37 "text-3xl font-semibold tracking-tight text-balance sm:text-4xl",38 badge && "mt-4"39 )}40 >41 {title}42 </h2>43 <p class="text-muted-foreground mt-2 text-base leading-7 text-balance">44 {description}45 </p>46 </div>4748 <div class="grid gap-6 md:grid-cols-2 lg:grid-cols-3">49 {50 articles.map((article) => (51 <a52 href={article.href ?? "#"}53 class="group hover:bg-muted/50 focus-visible:ring-ring/50 flex h-full flex-col gap-4 rounded-xl border p-6 transition-colors focus-visible:ring-2 focus-visible:outline-none"54 >55 <div class="flex flex-col gap-2">56 <p class="text-muted-foreground text-sm font-medium">57 {article.category}58 </p>59 <h3 class="text-foreground line-clamp-2 text-xl leading-snug font-semibold">60 {article.title}61 </h3>62 <p class="text-muted-foreground line-clamp-2 text-sm leading-6">63 {article.description}64 </p>65 </div>66 <div class="mt-auto flex items-center gap-3">67 <Avatar>68 <AvatarImage69 src={article.author.image}70 alt={article.author.name}71 />72 <AvatarFallback>{article.author.initials}</AvatarFallback>73 </Avatar>74 <div class="flex flex-col">75 <p class="text-sm font-medium">{article.author.name}</p>76 <p class="text-muted-foreground text-xs">77 {article.author.date}78// … 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-3articles-3 | 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 |
