Post Card
manifest-ui/post-cardFreeBlock
Post card with image, title, excerpt, author info and read more button. Supports default, compact, horizontal, and covered variants. Includes post-detail for fullscreen view.
Install it
npx shadcn@latest add https://ui.manifest.build/r/post-card.jsonSource
1'use client'23import { Button } from '@/components/ui/button'45// Import types from shared types file to avoid circular dependencies6import type { Post } from './types'7// Re-export for backward compatibility8export type { Post } from './types'910import { demoPost } from './demo/blogging'111213/**14 * ═══════════════════════════════════════════════════════════════════════════15 * PostCardProps16 * ═══════════════════════════════════════════════════════════════════════════17 *18 * Props for the PostCard component, a blog post card with multiple layout variants.19 */20export interface PostCardProps {21 data?: {22 /** The blog post to display. */23 post?: Post24 }25 actions?: {26 /** Called when the read more button is clicked. */27 onReadMore?: (post: Post) => void28 }29 appearance?: {30 /**31 * Card layout variant.32 * @default "default"33 */34 variant?: 'default' | 'compact' | 'horizontal' | 'covered'35 /**36 * Whether to show the cover image.37 * @default true38 */39 showImage?: boolean40 /**41 * Whether to show author information.42 * @default true43 */44 showAuthor?: boolean45 /**46 * Whether to show the category label.47 * @default true48 */49 showCategory?: boolean50 }51}5253/**54 * A blog post card component with multiple layout variants.55 * Supports default, compact, horizontal, and covered (overlay) styles.56 *57 * Features:58 * - Four layout variants (default, compact, horizontal, covered)59 * - Cover image with hover zoom effect60 * - Author avatar and info display61 * - Category and tags display62 * - Read more action button63 * - Responsive design64 *65 * @component66 * @example67 * ```tsx68 * <PostCard69 * data={{70 * post: {71 * title: "Getting Started Guide",72 * excerpt: "Learn the basics of our component library.",73 * coverImage: "https://example.com/image.jpg",74 * author: { name: "Sarah Chen", avatar: "https://example.com/avatar.jpg" },75 * publishedAt: "2024-01-15",76 * readTime: "5 min read",77 * tags: ["Tutorial", "Components"],78 * category: "Tutorial"79 * }80 * }}81 * actions={{82 * onReadMore: (post) => console.log("Read more:", post.title)83 * }}84// … truncated
What it pulls in
npm packages
Other registry items
Files it writes
More from Manifest UI
All 32 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Amount Inputamount-input | Manifest UI | Blocks | Free | 1 dep · 2 files | |
| Chat Conversationchat-conversation | Manifest UI | Blocks | Free | 1 dep · 3 files | |
| Contact Formcontact-form | Manifest UI | Blocks | Free | 1 dep · 3 files | |
| Date & Time Pickerdate-time-picker | Manifest UI | Blocks | Free | 1 dep · 2 files | |
| Event Cardevent-card | Manifest UI | Blocks | Free | 1 dep · 2 files | |
| Event Confirmationevent-confirmation | Manifest UI | Blocks | Free | 1 dep · 2 files | |
| Event Detailevent-detail | Manifest UI | Blocks | Free | 3 deps · 2 files | |
| Event Listevent-list | Manifest UI | Blocks | Free | 3 deps · 2 files |
