NavTitle
This component is mainly used in conjunction with wrap/eject in Custom Theme , and is different from components that are directly imported in MDX. You can modify the styles and functions by passing component props or directly overriding the component. If you override the entire component through eject, please note that the reading of the corresponding configuration options of the component will become invalid and you need to control it yourself.
This component is part of the navbar. NavTitle renders the site Logo and title in the top-left corner of the navbar.
Usage
Use through custom theme. The component internally reads configuration from rspress.config.ts through useSite:
Custom NavTitle
You can customize NavTitle through the navTitle prop of the Layout component:
Or use beforeNavTitle and afterNavTitle props to insert custom content:
For more information about custom themes, see the Custom Theme documentation.
Configuration
logo
- Type:
string | { light: string; dark: string }
Site Logo. Can be a single image path, or separate images for light/dark mode.
logoText
- Type:
string
Text displayed next to the Logo.
title
- Type:
string
Site title. Displayed when logo and logoText are not configured.
i18n Support
For multilingual sites, you can configure title in each locale:
The NavTitle component will automatically display the corresponding title based on the current language.