Vanilla Breeze

fab-stack

Fixed action button stack positioned in the bottom-right corner. Stacks multiple floating buttons vertically.

Overview

The <fab-stack> element positions a vertical stack of floating action buttons in the bottom-right corner. Uses column-reverse so the first child (primary action) sits at the bottom and secondary actions stack above it.

Handles mobile safe-area insets for devices with notches or home indicators.

Usage

Place at the end of the page body, after the footer. The Vanilla Breeze doc site uses this pattern for the settings gear and back-to-top arrow.

CSS Tokens

TokenDefaultDescription
--fab-stack-bottomvar(--size-l)Bottom offset from viewport
--fab-stack-endvar(--size-l)Inline-end offset from viewport
--fab-stack-gapvar(--size-s)Gap between stacked buttons

Positioning

Uses position: fixed with safe-area handling:

The pointer-events: none on the container with pointer-events: auto on children ensures only the buttons are clickable, not the invisible stack area.

With Back-to-Top

When [data-back-to-top] is inside fab-stack, its own fixed positioning is overridden to static so the stack controls placement.

Accessibility

  • Each child button should have its own aria-label
  • The stack is a visual grouping — no special ARIA role needed
  • Back-to-top uses scroll-driven animation for visibility

Related