Skip to content

StickyBar

Overview

Renders a sticky toolbar that hides when the user scrolls down past its initial position and reappears when they scroll back up or the scroll pauses.

Two modes:

  • Standalone (default). The bar self-stickies to the window's scroll (or to scrollRoot when it lives inside a scrollable region) and drives its own hide/reveal via useScrollReveal. The reveal strategy is selectable; scroll-up-or-idle is the default (and original) behavior.
  • Zone-managed (zone set). The bar teleports its surface into a StickyStackProvider zone (via StickyChrome) and lets that zone own the positioning and reveal, so it stacks with the page title and other chrome. When no provider is present the surface renders inline where the bar is placed.

Exposes named primary (submit / primary actions, pushed to the start) and secondary (read-only actions, contextual info) slots; falls back to the default slot when neither named slot is bound.

Theme entry: StickyBar

Props

NameTypeRequiredDefaultDescription
themeOverrideString|Object|ArraynullA partial theme object merged with the component's default theme; accepts a class string, class array, or theme object.
zonestringnullWhen set (top / bottom), the bar teleports into that StickyStackProvider zone, which owns its positioning and reveal; the bar does not stick itself. When null (the default) the bar is standalone and self-stickies. Read once at mount; changing it later does not re-home the bar.
ordernumber0Sort order of this bar within its zone's stack, ascending top to bottom. Only used when zone is set.
revealimport('vue').PropType<import('@vueda/use/useScrollReveal.js').ScrollRevealStrategy | boolean>"scroll-up-or-idle"Reveal behavior: a strategy string (always, scroll-up, scroll-up-or-idle) or a boolean (revealed when true). In standalone mode it drives the bar's own useScrollReveal; in zone-managed mode it is forwarded to the zone. Defaults to scroll-up-or-idle (a submit / action bar that returns the moment scrolling settles).
scrollRootobjectnullScroll container the bar reacts to. Pass the scrollable element (or a ref to one) when the bar lives inside a scrollable region rather than the page; the hide/reveal threshold and the scroll listener bind to it. When null (the default) the bar reacts to the window. Standalone mode only; in zone-managed mode the provider owns the scroll model.

Slots

NameScopedDescription
primaryPrimary action area (e.g. submit button), pushed to the start of the bar.
secondarySecondary action / contextual info area, pinned to the end of the bar.
default

Full slot reference

Source

client/lib/shell/sticky/StickyBar.vue

Documents matching: server v3.0.0a1.post1client v3.0.0-alpha.2