Skip to content

Scroll-dependent header styling

Sticky Header Customizer

Compare top-of-page and scrolled colors, minimum heights, and shadows. Try every setting in the free preview before choosing a code export.

Free preview. Code export: $11.99 once for personal use.

Choose the behavior

Enter six-digit hex colors. With background change off, the top background remains in both states. Text color is controlled separately. Image logos and header buttons keep their own styling.

These are minimum heights. Native padding, a large logo, or wrapped navigation can keep your actual header taller. This preview is a simplified example, not your installed site.

Scroll inside the preview

YOUR STUDIO
Example content

Work worth showing.

Scroll down, then back up to compare your settings.

Example section 1

This content makes the preview scrollable. It is not included in the exported code. The example navigation buttons stay on this page.

Example section 2

This content makes the preview scrollable. It is not included in the exported code. The example navigation buttons stay on this page.

Example section 3

This content makes the preview scrollable. It is not included in the exported code. The example navigation buttons stay on this page.

Example section 4

This content makes the preview scrollable. It is not included in the exported code. The example navigation buttons stay on this page.

Example section 5

This content makes the preview scrollable. It is not included in the exported code. The example navigation buttons stay on this page.

Top state. Background: transparent. Minimum height: 80px. Header visible.

Keyboard focus and an expanded menu keep the installed header visible. Reduced-motion preferences disable hiding and transitions. Check text contrast against every background you use.

Your next step

Like the result? Put it on your site.

Checking your tool access...

Install one customization, then inspect your real header.

  1. Try the native header controls first. If you use this export, enable Fixed position with the Basic style and remove older sticky-header snippets. Save a copy before replacing custom code.
  2. Confirm that your plan includes Code Injection. It is available on Core, Plus, Advanced, and eligible legacy plans. Check the official plan and injection instructions.
  3. Copy the purchased export into Footer Code Injection and save. It targets the native header#header or header.header, not an arbitrary page header. It leaves fixed positioning and page spacing to Squarespace.
  4. Inspect a published page at the top, halfway down, and after a refresh while scrolled. Open dropdowns and the mobile menu, use Tab through links, and check your logo, header buttons, and text contrast. Native layout and other custom code can affect the result.
  5. Remove this snippet to return to your native header styling. This release does not update an older export already pasted into a site.

The preview and export do not measure engagement or guarantee conversion or search gains. Read the native-first fixed-header walkthrough, or compare header layout and background settings.