Featured Blog Post List
Installation
Run the following command
npx vibes@latest add featured-blog-post-list
Usage
import { FeaturedBlogPostList } from '@/vibes/soul/sections/featured-blog-post-list';function Usage() { return ( <FeaturedBlogPostList blogPosts={posts} breadcrumbs={[ { id: '1', label: 'Home', href: '#', }, { id: '2', label: 'Blog', href: '#', }, ]} description="Expert Tips & Inspiration for Every Outdoor Lover" emptyStateSubtitle="Check back later for more content" emptyStateTitle="No blog posts found" paginationInfo={{ startCursor: '1', endCursor: '5', }} placeholderCount={6} title="Plant Life" /> );}const posts = [ { id: '5', title: 'A Guide to Low-Light Houseplants', content: 'Not all plants need bright sunlight to thrive. This guide highlights the best low-light houseplants, perfect for those darker corners of your home or office that need a touch of green.', image: { src: 'https://storage.googleapis.com/s.mkswft.com/RmlsZTo0NGVmOWFkZC00MDc5LTRmMTAtODIyMC0zM2UwNjNkMGRjZDM=/low-light.jpeg', alt: 'Low-Light Houseplants', }, date: '2024-07-20', href: '#', author: 'Author Name', },];
API Reference
FeaturedBlogPostListProps
Prop | Type | Default |
---|---|---|
className | string | |
title | string | |
description | string | null | |
blogPosts* | ||
paginationInfo | ||
breadcrumbs | ||
emptyStateSubtitle | Streamable <string> | |
emptyStateTitle | Streamable <string> | |
placeholderCount | number |
BlogPost
Prop | Type | Default |
---|---|---|
title* | string | |
author | string | null | |
content* | string | |
date* | string | |
image | {src: string; alt: string; } | null | |
href* | string |
CursorPaginationInfo
Prop | Type | Default |
---|---|---|
startCursorParamName | string | |
startCursor* | string | null | |
endCursorParamName | string | |
endCursor* | string | null |
Breadcrumb
Prop | Type | Default |
---|---|---|
label | string | |
href | string |
CSS Variables
This component supports various CSS variables for theming. Here's a comprehensive list.
:root { --featured-blog-post-list-font-family: var(--font-family-body); --featured-blog-post-list-title-font-family: var(--font-family-body); --featured-blog-post-list-title: var(--foreground); --featured-blog-post-list-description: var(--contrast-500);}