Skip to content
GaudiGaudi Design System home

Search documentation

Search every page, heading and paragraph.

FloatingMenu

A compact, inverted pill of destinations that floats over the page once the reader scrolls away from the header, with an optional Back to top button.

CoreNavigation@gaudi/design-system/core/FloatingMenuView in StorybookSource

LayoutContainer renders it for the site; pass targetRef and position sticky to use it inside a scroll container.

Installation

pnpm add github:ahmadassaf/design-system

Import from @gaudi/design-system. Load @gaudi/design-system/global.css once and add transpilePackages: ['@gaudi/design-system'] in Next.js.

import FloatingMenu from '@gaudi/design-system/core/FloatingMenu';

Usage

import { FloatingMenu } from '@gaudi/design-system';
// Fixed over the window; links default to SiteConfig navigation.links.<FloatingMenu links={[{ href: '/blog', title: 'Blog' }, { href: '/about', title: 'About' }]} />

Examples

Playground

Storybook

Reveal Past Threshold

Storybook

With Call To Action

Storybook

Keyboard Reveal

Storybook

API

10 props

Accessibility

A labelled navigation landmark that stays in the tab order while hidden; focusing it reveals it. The current link has aria-current="page". Reduced motion removes the slide and makes Back to top jump. On phones the links scroll inside the pill and Back to top collapses to its icon, so the page never overflows.