article-2
fulldev-ui/article-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/article-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 author: {16 image?: ImageMetadata17 initials: string18 name: string19 date: string20 readingTime: string21 }22 image: {23 src: ImageMetadata24 alt: string25 }26}2728const {29 class: className,30 badge,31 title,32 description,33 author,34 image,35} = Astro.props36---3738<Section class={cn("", className)}>39 <SectionContainer class="mx-auto max-w-2xl items-center gap-8 text-center">40 <div class="mx-auto flex w-full max-w-2xl flex-col items-center gap-6">41 {badge && <Badge variant="secondary">{badge}</Badge>}42 <div class="flex flex-col gap-4">43 <h144 class="text-4xl leading-tight font-semibold tracking-tight text-balance sm:text-5xl"45 >46 {title}47 </h1>48 <p class="text-muted-foreground text-lg leading-8 text-balance">49 {description}50 </p>51 </div>52 <div class="flex items-center gap-3">53 <Avatar size="lg">54 <AvatarImage src={author.image} alt={author.name} />55 <AvatarFallback>{author.initials}</AvatarFallback>56 </Avatar>57 <div class="flex flex-col text-left">58 <p class="text-sm font-medium">59 {author.name}60 <span class="text-muted-foreground font-normal">61 · {author.date}62 </span>63 </p>64 <p class="text-muted-foreground text-xs">{author.readingTime}</p>65 </div>66 </div>67 </div>6869 <Image70 src={image.src}71 alt={image.alt}72 class="aspect-16/10 w-full rounded-xl object-cover"73 widths={[640, 960]}74 sizes="(min-width: 42rem) 42rem, 100vw"75 />7677 <article78 class="mx-auto flex w-full max-w-2xl flex-col gap-6 text-left text-base leading-8"79 >80 <slot />81 </article>82 </SectionContainer>83</Section>
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 | |
| 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 | |
| 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 |
