SiteComponents Reference
Complete reference for the SiteComponents interface
SiteComponents
The SiteComponents interface defines the contract for marketing site templates.
import type { SiteComponents } from 'mdxui'
export const components: SiteComponents = {
Site,
Header,
Footer,
LandingPage,
Page,
// ... optional components
}Required Components
Site
Root wrapper component for the entire site.
interface SiteProps {
name: string
domain?: string
theme?: 'light' | 'dark' | 'system'
children: ReactNode
}Header
Navigation header component.
interface HeaderProps {
logo: ReactNode
nav: NavItem[]
cta?: { text: string; href: string }
LinkComponent?: ComponentType<LinkProps>
}Footer
Site footer component.
interface FooterProps {
logo: ReactNode
links: FooterLinkGroup[]
social?: SocialLink[]
copyright?: string
}LandingPage
Homepage/landing page layout.
interface LandingPageProps {
children: ReactNode
}Page
Generic content page layout.
interface PageProps {
title?: string
description?: string
children: ReactNode
}Optional Section Components
Hero
interface HeroProps {
title: string
subtitle?: string
cta: { text: string; href: string }
secondaryCta?: { text: string; href: string }
image?: string
video?: string
variant?: 'default' | 'centered' | 'split'
}Features
interface FeaturesProps {
title?: string
description?: string
features: FeatureItem[]
variant?: 'grid' | 'list' | 'bento'
columns?: number
}Pricing
interface PricingProps {
title?: string
description?: string
tiers: PricingTier[]
showToggle?: boolean
}Testimonials
interface TestimonialsProps {
title?: string
testimonials: Testimonial[]
variant?: 'grid' | 'carousel' | 'masonry'
}CTA
interface CTASectionProps {
title: string
description?: string
cta: { text: string; href: string }
secondaryCta?: { text: string; href: string }
variant?: 'simple' | 'split' | 'centered'
}FAQ
interface FAQProps {
title?: string
items: Array<{ question: string; answer: string }>
variant?: 'accordion' | 'grid' | 'list'
}Auto-Wired Content Components
These components automatically query Payload collections.
Blog
interface BlogProps {
site?: string
limit?: number
layout?: 'grid' | 'list' | 'featured'
showCategories?: boolean
posts?: Post[] // Manual override
}Auto-wires to: posts collection
BlogPost
interface BlogPostProps {
slug?: string
post?: Post // Manual override
showAuthor?: boolean
showRelated?: boolean
}Auto-wires to: posts collection
Docs
interface DocsProps {
project?: string
showSidebar?: boolean
showToc?: boolean
showSearch?: boolean
docs?: Doc[] // Manual override
}Auto-wires to: docs collection
DocsPage
interface DocsPageProps {
slug?: string
doc?: Doc // Manual override
showEdit?: boolean
showLastUpdated?: boolean
}Auto-wires to: docs collection