articles-2
fulldev-ui/articles-2FreeBlock
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-2.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 featured: {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 articles: {32 image: {33 src: ImageMetadata34 alt: string35 }36 category: string37 title: string38 description: string39 href?: string40 author: {41 image?: ImageMetadata42 initials: string43 name: string44 date: string45 }46 }[]47}4849const {50 class: className,51 badge,52 title,53 description,54 featured,55 articles,56} = Astro.props57---5859<Section class={cn("", className)}>60 <SectionContainer class="gap-8">61 <div class="mx-auto max-w-2xl text-center">62 {badge && <Badge variant="secondary">{badge}</Badge>}63 <h264 class={cn(65 "text-3xl font-semibold tracking-tight text-balance sm:text-4xl",66 badge && "mt-4"67 )}68 >69 {title}70 </h2>71 <p class="text-muted-foreground mt-2 text-base leading-7 text-balance">72 {description}73 </p>74 </div>7576 <a77 href={featured.href ?? "#"}78 class="group hover:bg-muted/50 focus-visible:ring-ring/50 grid gap-6 rounded-xl transition-colors focus-visible:ring-2 focus-visible:outline-none lg:grid-cols-2 lg:items-center lg:pr-4"79 >80 <Image81 src={featured.image.src}82 alt={featured.image.alt}83 class="aspect-4/3 rounded-lg object-cover transition-opacity group-hover:opacity-85"84 widths={[640, 960, 1280]}85 sizes="(min-width: 64rem) 50vw, 100vw"86 />87 <div class="flex flex-col gap-4">88 <Badge variant="outline" class="w-fit">{featured.category}</Badge>89 <h390 class="text-foreground text-2xl leading-tight font-semibold sm:text-3xl"91 >92 {featured.title}93 </h3>94 <p class="text-muted-foreground text-base leading-7">95 {featured.description}96 </p>97 <div class="flex items-center gap-3">98 <Avatar>99 <AvatarImage100// … 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-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 |
