Demo
  • HEROES & NAV

    • Hero Sections
    • Bold Heroes
    • Breadcrumbs
    • Banner Patterns
    • Floating Bars

    SOCIAL PROOF

    • Single Reviews
    • Multi Reviews
    • Multi Reviews (Alt)
    • Testimonial Sliders
    • Logo Grids
    • Stats & Counters

    CONTENT

    • Simple Post
    • Advanced Post
    • Modern Post
    • Timeline
    • Team Sections
    • Changelog
    • Careers
    • Events

    FORMS & FEEDBACK

    • CTA Sections
    • Contact Forms
    • Newsletter
    • Cookie Consent
    • Toasts

    FEATURES

    • 3 Card features
    • 4 Card Features
    • 6 Card Features
    • Feature Blocks
    • Process

    INTERACTIVE

    • Toggle Panels
    • Tabbed Sections
    • Video Lightboxes
    • Swiper Sliders
    • Vertical Sliders
    • Thumbnail Siders
    • Marquee Tickers
    • Before / After

    COMMERCE & DATA

    • Pricing Sections
    • Comparation Tables
    • Data tables

    LAYOUT

    • Footer Sections
    • Image Grids
    • Empty States
    • 404 Pages

    NAVIGATION

    • Navigation Bars

    MEDIA

    • Image Block
    • Icon Block
    • Video Block
    • Video Lightbox Block
    • Avatar Block

    DISPLAY

    • Badge Block
    • Tag Block
    • Tooltip Block
    • Card Block
    • Divider Block
    • Breadcrumb Block

    Layout

    • Grid Block
    • Flex Block
    • Absolute Box Block

    TYPOGRAPHY

    • Heading Block
    • Paragraph Block
    • List Block
    • Blockquote Block

    INTERACTIVE

    • Button Block
    • Link Button Block
    • Accordion Block
    • Tabs Block
    • Slider Block
    • Thumbnail Slider Block
    • Marquee Block
    • Before After Slider Block

    DATA & CCOMMERCE

    • Data Table Block
    • Pricing Block
    • Progress Block
    • Timeline Block

    FORMS

    • Contact Form Block

    TECH & SAAS

    • Helios
    • Tempo
    • Verso
    • Ledge Finance

    TRAVEL & LEISURE

    • Meridian
    • Traverse
    • Vela
    • Wildpath
    • Poseidon

    HOSPITALITY

    • Wineatic
    • Trattoria Sole
    • Santa Lucia

    SERVICES & DESIGN

    • Kova
    • Haven Studio
    • Volta
    • Pxlcraft
    • Apex Agency

    SPECIALITY

    • Bright Smile
    • Dentist Modern
    • Bento
  • Ecommerce
  • Docs
Websites
Patterns
HEROES & NAV
Hero SectionsBold HeroesBreadcrumbsBanner PatternsFloating Bars
SOCIAL PROOF
Single ReviewsMulti ReviewsMulti Reviews (Alt)Testimonial SlidersLogo GridsStats & Counters
CONTENT
Simple PostAdvanced PostModern PostTimelineTeam SectionsChangelogCareersEvents
FORMS & FEEDBACK
CTA SectionsContact FormsNewsletterCookie ConsentToasts
FEATURES
3 Card features4 Card Features6 Card FeaturesFeature BlocksProcess
INTERACTIVE
Toggle PanelsTabbed SectionsVideo LightboxesSwiper SlidersVertical SlidersThumbnail SidersMarquee TickersBefore / After
COMMERCE & DATA
Pricing SectionsComparation TablesData tables
LAYOUT
Footer SectionsImage GridsEmpty States404 Pages
Blocks
NAVIGATION
Navigation Bars
MEDIA
Image BlockIcon BlockVideo BlockVideo Lightbox BlockAvatar Block
DISPLAY
Badge BlockTag BlockTooltip BlockCard BlockDivider BlockBreadcrumb Block
Layout
Grid BlockFlex BlockAbsolute Box Block
TYPOGRAPHY
Heading BlockParagraph BlockList BlockBlockquote Block
INTERACTIVE
Button BlockLink Button BlockAccordion BlockTabs BlockSlider BlockThumbnail Slider BlockMarquee BlockBefore After Slider Block
DATA & CCOMMERCE
Data Table BlockPricing BlockProgress BlockTimeline Block
FORMS
Contact Form Block
Demos
TECH & SAAS
HeliosTempoVersoLedge Finance
TRAVEL & LEISURE
MeridianTraverseVelaWildpathPoseidon
HOSPITALITY
WineaticTrattoria SoleSanta Lucia
SERVICES & DESIGN
KovaHaven StudioVoltaPxlcraftApex Agency
SPECIALITY
Bright SmileDentist ModernBento
EcommerceDocs
On This Page
Float Header BlockPill BehaviorLogo & MenuColorsOverlay NavigationCTAAll Available Controls
Blocks
Grid Block
Grid Item Block
Flex Block
Absolute Block
Heading Block
Paragraph Block
List Block
Image Block
Icon Block
Video Block
Video Lightbox Block
Button Block
Accordion Block
Tabs Block
Slider Block
Slider Item Block
Thumbnail Slider
Thumbnail Slider Item
Marquee Block
Marquee Item Block
Before / After
Data Table Block
Pricing Card Block
Progress Bar Block
Timline Block
Header Block
Simple Header
Advanced Header
Advanced Header Featured
Float Header
Blog Listing Block
Separator Block
Contact Form Block
Docs

/

Float Header Block

Float Header Block

A floating pill-style navigation header that starts full-width and transitions to a centered pill shape on scroll. Includes logo, menu button, and a CTA extracted from an inner button block.

FLOAT HEADER — BEFORE & AFTER SCROLL

TOP OF PAGE

Menu

Get Started

AFTER SCROLL THRESHOLD

Menu

Get Started

The header shrinks to a centered pill with rounded corners and optional blur after the scroll threshold is reached.

Dynamic block. This block uses render.php for server-side rendering. The editor save function outputs only the inner button-block markup (InnerBlocks.Content). At render time, render.php builds the full header HTML and regex-extracts the CTA link, text, and target from the saved button-block output.

When to use this block

  • Modern marketing sites that need a floating, pill-style sticky nav
  • Headers that should transition from full-width to compact on scroll
  • Navigation with a full-screen overlay menu and optional accordion sub-nav
  • Single CTA button in the header bar extracted from an inner block

Pill Behavior

Configure when and how the header transitions from full-width to centered pill. The pill shape activates after the user scrolls past the threshold distance.

Scroll & Pill

Sidebar Panel

Fixed

Scroll Threshold

100

px

Scroll Blur

Pill Border Radius

999

px

Border Color

#E4E4E4

HOW IT WORKS

Fixed (default true) — keeps the header pinned to the top of the viewport as the user scrolls.

Scroll Threshold — distance in pixels the user must scroll before the pill transition triggers.

Scroll Blur — applies a backdrop-filter: blur() to the pill for a frosted glass effect.

Pill Border Radius — the border-radius applied to the scrolled pill state. Use 999px for a fully rounded pill.

Logo & Menu

Upload a logo image and configure the menu toggle button with custom open/close labels.

Logo

Sidebar Panel

Logo URL

Upload

Max Width

120

px

Max Height

40

px

Menu Button

Sidebar Panel

Menu ID

Primary

Open Text

Menu

Close Text

Close

Font Size

14

px

Font Weight

500

Logo max-width and max-height are responsive across breakpoints: Mobile Tablet Desktop

Colors

Full color control across every element — the nav bar itself (pre- and post-scroll), the menu button and close button, the overlay, and the bottom border.

Nav Bar Colors

Sidebar Panel

Nav Bar Bg

#FFFFFF

Scrolled Bg

rgba

Accent

#171717

Light

#FFFFFF

Dark

#171717

Border Bottom Color

#E4E4E4

Border Bottom Width

1

px

Menu & Close Button

Sidebar Panel

Menu Circle

#171717

Menu Icon

#FFFFFF

Menu Text

#171717

Close Circle

#171717

Close Icon

#FFFFFF

Overlay Colors

Sidebar Panel

Overlay Bg

#171717

Link Color

#FFFFFF

Hover Color

#AOAOAO

Overlay Navigation

When the menu button is clicked, a full-screen overlay displays the navigation links from the selected WordPress menu. Sub-navigation items can be shown as an accordion or hidden entirely.

Overlay Settings

Sidebar Panel

Sub-Nav Mode

Accordion
None

Typography Size

48

px

Typography Weight

500

OVERLAY PREVIEW

Home

Services

Web Design

Development

About

Contact

Accordion mode shows child items with an expand/collapse toggle. “None” hides sub-nav items entirely.

CTA

The call-to-action button in the header comes from an inner button-block placed via InnerBlocks. This is a hybrid save pattern — the editor saves the button-block markup, and render.php regex-extracts the URL, text, and target from it at render time.

How it works

  • In the editor, add a Button Block as the only inner block
  • Set the button text, URL, and target (_blank / _self) as usual
  • save.js outputs the button markup via <InnerBlocks.Content />
  • On the front end, render.php uses regex to extract href, link text, and target from the saved markup
  • The extracted values are injected into the server-rendered header HTML as the CTA link

Important

  • Only one inner block is expected — a single button-block
  • The button-block styling (colors, radius) is not carried over — render.php applies its own CTA styles using the header color attributes
  • If no inner button-block is found, the CTA area is simply omitted from the rendered output

All Available Controls

Scroll & Pill Fixed, threshold, blur, pill radius, border

fixed: boolean (default true). scrollThreshold: number in px — distance before pill activates. scrollBlur: boolean — enables backdrop blur on scrolled state. pillBorderRadius: px value for pill shape (e.g. 999). borderColor: hex color for the pill border.

Logo URL, max width/height (responsive)

logo: object with url (image URL), maxWidth and maxHeight (responsive across breakpoints). Upload via the media library in the sidebar panel. The logo is rendered as an <img> element inside the header bar.

Colors Nav bar, overlay, menu/close buttons, border

Nav bar: navBarBg, scrolledBg, accent, light, dark. Menu button: menuCircleColor, menuIconColor, menuTextColor. Close button: closeCircleColor, closeIconColor. Overlay: overlayBg, overlayLinkColor, overlayHoverColor. Border: navBorderBottomColor, navBorderBottomWidth (px).

Overlay & Typography Sub-nav mode, overlay text size/weight, menu button text

overlaySubNav: "accordion" or "none". Overlay typography: overlayFontSize (px), overlayFontWeight. Menu button typography: menuFontSize (px), menuFontWeight. menuOpenText: label when closed (e.g. "Menu"). menuCloseText: label when open (e.g. "Close").

Layout & Spacing Header height, padding, max width (responsive)

headerHeight: responsive (px) across 3 breakpoints. padding: responsive (px) — horizontal inner spacing of the header bar. maxWidth: constrains the header content width (e.g. 1200px). All responsive: Mobile  Tablet  Desktop

CTA (Inner Block) Button-block extracted via render.php regex

Add a single Button Block as an inner block. Set the link URL, button text, and target attribute in the editor. At render time, render.php regex-extracts href, inner text, and target from the saved button markup and injects them into the header CTA. Button styling is controlled by the header color attributes, not the inner block styles.

Related Blocks

Header Block

Standard site header with navigation and branding.

Simple Header

Lightweight header for minimal navigation layouts.

Advanced Header

Full-featured header with mega-menu dropdowns and featured content areas.

Brandname

Building tools that help teams move faster, ship better, and stay aligned.

Product

  • Features
  • Pricing
  • Integrations
  • Changelog

Company

  • About
  • Blog
  • Careers
  • Press

Resources

  • Documentation
  • API Reference
  • Support
  • Status

© 2026 Brandname. All rights reserved.

Privacy Policy
Terms of Service