🚧 Rspress 2.0 document is under development
close

HomeBackground eject-only

Warning

This is an eject-only component, designed specifically for wrap/eject, and is not recommended for direct use in MDX files

This component is part of the Home Page. HomeBackground renders a background effect on the home page and automatically sets the navigation bar to transparent style.

Usage

You can eject this component to customize it.

index.mdx
import { HomeBackground } from '@rspress/core/theme';

<HomeBackground className="my-custom-bg" />

Props

This component inherits all React.HTMLAttributes<HTMLDivElement> properties.

className

  • Type: string

Add custom CSS class names to customize the background style.

How it works

  • The component automatically switches the navigation bar to transparent mode
  • You can customize the .rp-home-background class via CSS to adjust the background effect