Post List
manifest-ui/post-listFreeBlock
Post list with list, grid, carousel, and fullwidth variants. Fullwidth mode shows paginated posts.
Install it
npx shadcn@latest add https://ui.manifest.build/r/post-list.jsonSource
1'use client'23import { Button } from '@/components/ui/button'4import { cn } from '@/lib/utils'5import { ChevronLeft, ChevronRight } from 'lucide-react'6import { useState } from 'react'7import type { Post } from './types'8import { PostCard } from './post-card'9import { demoPosts } from './demo/blogging'1011/**12 * ═══════════════════════════════════════════════════════════════════════════13 * PostListProps14 * ═══════════════════════════════════════════════════════════════════════════15 *16 * Props for the PostList component, a blog post list with multiple layout variants.17 */18export interface PostListProps {19 data?: {20 /** Array of blog posts to display. */21 posts?: Post[]22 }23 actions?: {24 /** Called when the read more button is clicked on a post. */25 onReadMore?: (post: Post) => void26 }27 appearance?: {28 /**29 * Layout variant for the post list.30 * @default "list"31 */32 variant?: 'list' | 'grid' | 'carousel' | 'fullwidth'33 /**34 * Number of columns for grid and fullwidth variants.35 * @default 236 */37 columns?: 2 | 3 | 438 /**39 * Whether to show author information on post cards.40 * @default true41 */42 showAuthor?: boolean43 /**44 * Whether to show category labels on post cards.45 * @default true46 */47 showCategory?: boolean48 }49}5051/**52 * A blog post list component with multiple layout variants.53 * Supports list, grid, carousel, and fullwidth paginated modes.54 *55 * Features:56 * - Four layout variants (list, grid, carousel, fullwidth)57 * - Responsive grid columns58 * - Carousel with touch-friendly navigation59 * - Fullwidth mode with pagination60 * - Configurable author and category display61 *62 * @component63 * @example64 * ```tsx65 * <PostList66 * data={{67 * posts: [68 * {69 * title: "Getting Started Guide",70 * excerpt: "Learn the basics...",71 * coverImage: "https://example.com/image.jpg",72 * author: { name: "Sarah Chen" },73 * publishedAt: "2024-01-15"74 * }75 * ]76 * }}77 * appearance={{78 * variant: "grid",79 * columns: 3,80 * showAuthor: true81 * }}82 * actions={{83 * onReadMore: (post) => console.log("Read:", post.title)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 |
