articles-1
fulldev-ui/articles-1FreeBlock
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-1.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 description: string15 articles: {16 image: {17 src: ImageMetadata18 alt: string19 }20 category: string21 title: string22 description: string23 href?: string24 author: {25 image?: ImageMetadata26 initials: string27 name: string28 date: string29 }30 }[]31}3233const { class: className, badge, title, description, articles } = Astro.props34---3536<Section class={cn("", className)}>37 <SectionContainer class="gap-8">38 <div class="flex max-w-2xl 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 <p class="text-muted-foreground text-base leading-7">52 {description}53 </p>54 </div>5556 <div class="grid gap-6 md:grid-cols-2 lg:grid-cols-3">57 {58 articles.map((article) => (59 <a60 href={article.href ?? "#"}61 class="group hover:bg-muted/50 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"62 >63 <Image64 src={article.image.src}65 alt={article.image.alt}66 class="-mx-4 -mt-4 aspect-video w-[calc(100%+2rem)] max-w-none rounded-lg object-cover transition-opacity group-hover:opacity-85"67 widths={[480, 720, 960]}68 sizes="(min-width: 64rem) 26rem, (min-width: 48rem) 50vw, 100vw"69 />70 <div class="flex flex-col gap-2">71 <p class="text-muted-foreground text-sm font-medium">72 {article.category}73 </p>74 <h3 class="text-foreground line-clamp-2 text-xl leading-snug font-semibold">75 {article.title}76 </h3>77 <p class="text-muted-foreground line-clamp-2 text-sm leading-6">78 {article.description}79 </p>80 </div>81 <div class="mt-auto flex items-center gap-3">82// … 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-2articles-2 | fulldev/ui | Blocks | Free | no deps | |
| articles-3articles-3 | 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 |
