Skip to main content

Header · Floating pills

A floating split bar: the logo, the menu and a call to action in three pills spread across the top. Once the page scrolls, the menu pill closes up and the three meet in the middle. On tablets and phones it is one pill with the menu button.

Header · Floating pills

See it live: Header · Floating pills on fancybricks.co — the live preview, and the button that copies it.

Or open the preview on its own — narrow the window to see it on a phone — and in dark mode.

In the builder

Preview on the front end. Scripts don't run inside the builder, so here you only see the layout: the pills only meet in the middle while scrolling a page on the front end (it needs the script). Save and open the page to see the full result.

Structure​

This is what the Bricks Structure panel shows after you paste the template. Component instances say which component they are.

Header · Floating pills (FBK Header)
Nav · Logo
Nav · Menu
Button · Get started (FBK Button)
Header · Scroll script (needs Execute code)

The template also pastes a dashed note above the section, with the short version of this page. It only shows inside the builder, never on the published page — see Builder notes.

How to adjust​

Every step is the same move: pick the element in the Structure panel, change its Properties.

Where are those panels?

How to adjust a template shows every one of them in a screenshot of the real builder: the Structure and Properties panels, the classes on an element, a component's style families and the field where a CSS variable goes.

  1. Paste the template in Bricks first — see Copy and paste.
  2. Select Header · Floating pills (FBK Header) › Properties: Layout group: Layout, Menu panel, Phone menu text size, Position, Mega menu width, Phone submenus, Scroll effect · Style group: Link effect, Submenu link effect, Submenu opening, Bar style, Background · Show or hide group: Hide actions.
  3. Select Button · Get started (FBK Button) › Properties: Text, Link, Tone, Shadow on hover · Icon group: Icon, Icon position · Style group: Style, Size, Width, Hover effect.
  4. Select Nav · Menu › Content › Menu: pick your WordPress menu (Appearance › Menus).

Requirements​

  • Code execution. Needs "Execute code" enabled for the role in Bricks → Settings → Custom code, or the JS block shows as plain text instead of running.

What each requirement is, and how to set it up once for the whole site: Requirements.

Finish by hand​

  • Hover effects: the links change color (Link effect None of FBK Header; pick another effect there); fbk-btn--sweep on the button.
  • Scroll effect Merge into pills of FBK Header (class fbk-nav--merge): it needs Position Floating (or Sticky) and the element Header · Scroll script (Execute code). Speed: --fbk-nav-merge-speed; the pills' color: --fbk-nav-pill-bg; the gap once they meet: --fbk-nav-pill-gap (all on .fbk-nav). Set Scroll effect to None for pills that stay apart.
  • The menu is the Bricks Nav Menu (Nav · Menu): pick your WordPress menu in its settings (Menu). Here it shows the demo menu Fancy Bricks demo, with submenus and sub-submenus; on your site, until you pick one, Bricks shows one of your menus. Its sizes and colors are Nav Menu settings saved in the class .fbk-nav__menu (Top level, Sub menu, Mobile menu).
  • This is a Bricks header template: in your site set where it shows (Template settings > Conditions), or paste its section into your own header template.
  • The header is the FBK Header component: put your logo, menu and buttons in its slots (Logo, Menu, Actions; a top bar or a row over the bar goes in the Top slot, rows and scripts under it in the Bottom slot). Layout, link effect, submenu effect, menu panel, position (sticky, over the hero), bar style and background are its properties.
  • Pasted a Fancy Bricks header before? Bricks keeps the FBK Header already on your site when you paste, so its new options (Scroll effect, Bar style Grid) are missing. To update it: delete FBK Header in the builder's Components panel and paste this template again; your other headers switch to the new version.
  • Logo: the image Nav · Logo (its alt text says where it goes: Northwind home).

On phones​

The template is designed desktop first, the Bricks default, and only changes at the two widths the library uses:

  • 991px and below — .fbk-nav, .fbk-nav__menu.
  • 767px and below — .fbk-nav__actions, .fbk-nav__menu, .fbk-section.

Those changes live in Bricks' own breakpoint fields, so you edit them where you always do: pick the breakpoint in the toolbar and the same fields follow.

Careful with the classes shared by the whole library (fbk-section, fbk-intro, the component classes): a change there shows up in every template that uses them.

If your site's breakpoints are set up mobile first, copy the mobile-first variant of the template instead — see Copy and paste.

Accessibility​

In this template, keyboard focus is visible on every interactive piece; movement is cut back when the visitor's system asks for less motion.

What is checked on every template, and what depends on your own palette: Accessibility.

Dark mode​

This section stays light whatever your site does: it does not carry the fbk-section--auto-dark class, which is only added to templates checked on a dark background.

How the library follows your site's color scheme: Dark mode and preview.