--- title: 'previewHead' --- Parent: [main.js|ts configuration](./main-config.md) Type: `(head: string) => string` Programmatically adjust the [preview ``](../configure/story-rendering.md#adding-to-head) of your Storybook. Most often used by [addon authors](../addons/writing-presets.md#ui-configuration). If you don't need to programmatically adjust the preview head, you can add scripts and styles to [`preview-head.html`](../configure/story-rendering.md#adding-to-head) instead. For example, you can conditionally add scripts or styles, depending on the environment: