mdxui

Landing Package Mapping

How @mdxui/beacon components map to SiteComponents

Landing Package → SiteComponents

This document maps the existing @mdxui/beacon package components to the SiteComponents interface defined in mdxui.

Component Mapping

mdxui TypeLanding ComponentStatusNotes
Site-❌ MissingNeeds new root wrapper component
HeaderHeader✅ ExistsProps need alignment
FooterFooter✅ ExistsProps need alignment
LandingPageLandingLayout⚠️ RenameDifferent name, similar purpose
Page-❌ MissingGeneric page wrapper needed
HeroHero, Hero1, Hero2✅ ExistsMultiple variants, props differ
FeaturesFeatures✅ ExistsProps structure similar
PricingPricing✅ ExistsProps need alignment
Testimonials-❌ MissingNot implemented yet
CTA-❌ MissingNot implemented yet
FAQFAQs✅ ExistsNamed differently (plural)
Blog-❌ MissingAuto-wired component
BlogPost-❌ MissingAuto-wired component
Docs-❌ MissingAuto-wired component
DocsPage-❌ MissingAuto-wired component

Additional in Landing (not in mdxui)

ComponentPurposeAction
DirectoryDirectory listingsConsider adding to mdxui

Props Alignment

mdxui HeaderProps:

{
  logo: ReactNode
  nav: NavItem[]
  cta?: CTA
  LinkComponent?: ComponentType<LinkProps>
}

Landing HeaderProps:

{
  logo: ReactNode
  links: HeaderLink[]  // Different name
  primaryCta?: string  // Different structure
  onPrimaryCta?: () => void
  secondaryCta?: string
  onSecondaryCta?: () => void
  LinkComponent?: ComponentType<HeaderLinkProps>
  maxWidth?: string
  className?: string
}

Changes needed:

  • Rename links → nav
  • Restructure CTAs to use CTA type instead of separate strings

Hero

mdxui HeroProps:

{
  title: string
  subtitle?: string
  cta: CTA
  secondaryCta?: CTA
  image?: string
  video?: string
  variant?: 'default' | 'centered' | 'split'
}

Landing HeroProps:

{
  variant?: 'default' | 'centered'
  title: string
  highlightedText: string  // Extra
  description: string      // Named differently
  primaryButtonText: string
  primaryButtonHref?: string
  onPrimaryClick?: () => void
  secondaryButtonText?: string
  // ... more granular button props
  backgroundType?: 'image' | 'hatch' | 'none'
  showCodeTabs?: boolean
  codeTabs?: CodeTabItem[]
}

Changes needed:

  • Merge title + highlightedText or add highlightedText to mdxui
  • Rename description → subtitle
  • Consolidate button props into CTA structure
  • Consider adding backgroundType and codeTabs to mdxui

FAQ

mdxui:

{
  title?: string
  items: Array<{ question: string; answer: string }>
  variant?: 'accordion' | 'grid' | 'list'
}

Landing FAQsProps:

{
  // Need to check actual implementation
}

Action Items

  1. Create missing components:

    • Site - root wrapper with theme/providers
    • Page - generic page layout
    • Testimonials - testimonial grid/carousel
    • CTA - call-to-action section
    • Blog, BlogPost - for posts collection
    • Docs, DocsPage - for docs collection
  2. Align existing components:

    • Update Header props structure
    • Update Hero props structure
    • Rename FAQs → FAQ
    • Rename LandingLayout → LandingPage
  3. Consider additions to mdxui:

    • highlightedText for Hero
    • backgroundType options
    • codeTabs for developer-focused heroes
    • Directory component type

On this page