StickyMenu#
StickyMenu is a desktop fixed-position navigation component rendered on the right side of the screen. MobileStickyMenu is its mobile counterpart, rendered as a carousel fixed to the bottom of the screen. Both components read their data from the kitconcept.sticky_menu Plone behavior via the inherit API expander.
Backend behavior#
Property |
Value |
|---|---|
Dotted name |
|
Interface class |
|
Module |
|
Title |
Sticky menu |
Description |
Sticky menu showing fixed in the right side of the screen |
Fields#
Field |
Type |
Widget |
Required |
Default |
Description |
|---|---|---|---|---|---|
|
|
|
No |
|
List of icon links composing the menu |
|
|
|
No |
— |
Background color |
|
|
|
No |
— |
Text color |
|
|
— |
No |
|
Show the mobile sticky menu at the bottom of the screen |
Each item in sticky_menu is an iconLink object:
Field |
Type |
Description |
|---|---|---|
|
|
Item identifier |
|
|
Link label |
|
|
Icon image |
|
|
Link target |
|
|
Open in a new tab |
Slot registration#
Both components are registered by default by @kitconcept/volto-light-theme in src/config/slots.ts.
Component |
Slot |
Registration name |
|---|---|---|
|
|
|
|
|
|
Component: StickyMenu#
File: frontend/packages/volto-light-theme/src/components/StickyMenu/StickyMenu.tsx
Props#
Prop |
Type |
Required |
|---|---|---|
|
|
Yes |
Behaviour#
Reads sticky_menu, sticky_menu_color, and sticky_menu_foreground_color from the kitconcept.sticky_menu inherit expander on content. Renders an IconLinkList inside a <div class="sticky-menu">.
Hidden via CSS in CMS UI, add view, edit view, and on mobile screens (≤ $largest-mobile-screen).
CSS#
Class |
Element |
|---|---|
|
Root |
CSS variable |
Fallback |
|---|---|
|
|
|
|
Positioning: position: fixed, right 0, vertically centered (top: 50vh, transform: translateY(-50%)). On screens taller than 969px: top: 373px, transform: none. Z-index: 11.
Component: MobileStickyMenu#
File: frontend/packages/volto-light-theme/src/components/StickyMenu/MobileStickyMenu.tsx
Props#
Prop |
Type |
Required |
|---|---|---|
|
|
Yes |
Behaviour#
Reads enable_mobile_sticky_menu, sticky_menu, sticky_menu_color, and sticky_menu_foreground_color from the kitconcept.sticky_menu inherit expander. Returns null when enable_mobile_sticky_menu is false.
Renders menu items as a horizontal Embla Carousel (useEmblaCarousel) with PrevButton and NextButton arrow controls.
CSS#
Class |
Element |
|---|---|
|
Root |
|
Carousel container |
|
Carousel viewport |
|
Carousel track |
|
Individual slide (33% width via |
|
Arrow button base |
|
Previous arrow |
|
Next arrow |
CSS variable |
Fallback |
|---|---|
|
|
|
|
Positioning: position: fixed, bottom 0, full width, height 100px. Z-index: 100. Hidden by default (display: none), shown on mobile screens (≤ $largest-mobile-screen).
Removing the default registration#
config.unRegisterSlotComponent('aboveHeader', 'StickyMenu', 0);
config.unRegisterSlotComponent('preFooter', 'MobileStickyMenu', 0);
Registering a custom sticky menu component#
import MyMenu from './MyMenu';
config.registerSlotComponent({
slot: 'aboveHeader',
name: 'StickyMenu',
component: MyMenu,
});