Stand with Ukraine 🇺🇦

Floating Panel — Confluence Cloud Macro

formatting

This Confluence user macro lets users add a customizable floating panel to any page. One can configure the panel’s background color, size, position (top-left, top-center, top-right, or under the Confluence sidebar), etc.

The panel accepts rich-text content, including built-in Confluence macros like Table of Contents or Excerpt, allowing you to reuse native features with enhanced visual positioning and floating behavior.

Try for free

User Parameters

Position

Select the panel's position on the page (default is top-right)

Transparent Background

Enable transparent background (default uses the current theme's color)

Width

Set the panel's width in "em" (1em ≈ 16px)

Height

Set the panel's height in "em" (1em ≈ 16px)

Border

Add a subtle border to the panel

Template

## Background color
#set($bg = "var(--ds-surface, #FFFFFF)")
#if($parameters["transparentBackground"])
#set($bg = "transparent")
#end

## Width
#set($width = "10.5em")
#if($parameters["width"])
#set($width = $parameters["width"])
#end

## Height
#set($height = "")
#if($parameters["height"])
#set($height = "height: $parameters['height'];")
#end

## Border
#set($border = "")
#if($parameters["border"])
#set($border = "border: 1px solid #d9d9d9; border-radius: 8px;")
#end

## Positioning
#*
beneath-sidebar means the panel is positioned under the Confluence sidebar.
If the sidebar is open, the panel will be hidden behind it.
If the sidebar is closed, the panel will appear aligned to the left edge of the page.
*#
#set($top = "17%")
#set($right = "5%")

#if($parameters["position"] == "top-left")
  #set($right = "70%")
#elseif($parameters["position"] == "beneath-sidebar")
  #set($right = "85%")
#end

<div class="aui-dialog2 aui-layer" style="top: $top; height: 80em; right: $right; display: block; visibility: hidden; z-index: 10;">
    <div style="padding: 0.5em; float: right; width: $width; background-color: $bg; $height $border visibility: visible; overflow: auto;">
        $body
    </div>
</div>