storybook/docs/api/main-config/main-config-manager-head.mdx
2024-07-09 23:44:05 +01:00

27 lines
746 B
Plaintext

---
title: 'managerHead'
sidebar:
order: 14
title: managerHead
---
Parent: [main.js|ts configuration](./main-config.mdx)
Type: `(head: string) => string`
Programmatically adjust the manager's `<head>` of your Storybook. For example, load a custom font or add a script. Most often used by [addon authors](../../addons/writing-presets.mdx#ui-configuration).
<Callout variant="info" icon="💡">
If you don't need to programmatically adjust the manager head, you can add scripts and styles to `manager-head.html` instead.
</Callout>
For example, you can conditionally add scripts or styles, depending on the environment:
{/* prettier-ignore-start */}
<CodeSnippets path="main-config-manager-head.md" />
{/* prettier-ignore-end */}