diff --git a/fern/products/docs/pages/customization/custom-header-footer.mdx b/fern/products/docs/pages/customization/custom-header-footer.mdx index 9f64208b0..4e3258094 100644 --- a/fern/products/docs/pages/customization/custom-header-footer.mdx +++ b/fern/products/docs/pages/customization/custom-header-footer.mdx @@ -61,10 +61,43 @@ Replace Fern's default header or footer with your own React components. Componen ``` -## Advanced configuration +## Built-in Fern components - - + + Built-in Fern components are in beta and subject to change. + + +Custom header and footer components receive a `Fern` prop containing built-in UI components. This lets you compose custom layouts while reusing Fern's built-in primitives like search, navigation, and theme switching. + +```tsx components/CustomHeader.tsx +export default function CustomHeader({ Fern }) { + return ( +
+ + + +
+ ); +} +``` + +The following components are available on the `Fern` prop: + +| Component | Description | +| --- | --- | +| `` | Your site logo as configured in `docs.yml`. Links to the homepage. | +| `` | The search bar, including the AI search trigger if enabled. | +| `` | Drop-down to switch between products (only renders if you have multiple products configured). | +| `` | Drop-down to switch between API versions (only renders if you have versions configured). | +| `` | Drop-down to switch the active language. | +| `` | The navigation links configured under `navbar-links` in `docs.yml`. | +| `` | The login/signup button for authenticated docs. | +| `` | Toggle between light and dark mode. | + +## Using React Hooks You can use React `useState` to build interactive headers with drop-down menus. Below is an example that renders a navigation bar with a "Products" drop-down that opens on click: @@ -116,6 +149,3 @@ export default function CustomHeader() { ); } ``` - -
-