storybook/docs/api/main-config-manager-head.mdx
2024-06-13 17:52:40 +01:00

29 lines
768 B
Plaintext

---
title: 'managerHead'
---
Parent: [main.js|ts configuration](./main-config.md)
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.md#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
paths={[
'common/main-config-manager-head.js.mdx',
'common/main-config-manager-head.ts.mdx',
]}
/>
{/* prettier-ignore-end */}